StickNitro / ngx-fullcalendar

An Angular wrapper for the https://fullcalendar.io module
MIT License
11 stars 14 forks source link

@ViewChild('theCalendar') #21

Closed CrackerakiUA closed 5 years ago

CrackerakiUA commented 5 years ago

Trying to get connection with the calendar.

<ngx-fullcalendar
    #theCalendar
></ngx-fullcalendar>
import { FullCalendarComponent } from 'ngx-fullcalendar';
...
@ViewChild('theCalendar') theCalendar: FullCalendarComponent;
ngOnInit() {
    console.log(this.theCalendar);
}

which log undefined. What I am doing wrong?

CrackerakiUA commented 5 years ago

@StickNitro can you quickly check this? I believe this will take 5 min of your time.

jassi5887 commented 5 years ago

@CrackerakiUA please use console.log in ngAfterViewInit.

CrackerakiUA commented 5 years ago

works, thank you.