Search code examples
angularfullcalendarfullcalendar-5async-pipe

Is it possible to use Angular async pipe with FullCalendar?


If it is possible, does anyone have an example of how to use async pipe in FullCalendar? For example something like this?

<full-calendar [events]="events$ | async"></full-calendar>

Solution

  • You could create a container around your html tag and pass the entire config options object:

    <ng-container *ngIf="calendarOptions2$ | async as options">
      <full-calendar [options]="options"></full-calendar>
    </ng-container>
    

    Working example: https://stackblitz.com/edit/angular-ivy-ht8hof