0
如何在Ionic 3和Angular 4的事件(例如,單擊)中初始化fullCalendar?FullCalendar in Ionic3 with Angular 4
設置可變日曆選項時,此代碼的工作:
calendarOptions: Object = {
fixedWeekCount: true,
editable: true
};
但是,當我打電話給函數,不工作:
buildCalendar(): void{
this.calendarOptions: Object = {
fixedWeekCount: true,
editable: true
};
}
的HTML代碼,其中的日曆被稱爲
<angular2-fullcalendar
[options]="calendarOptions"
(initialized)="onCalendarInit($event)"></angular2-fullcalendar>
buildCalendar調用的角度代碼:
getAging(): void {
this.myProvider.getAging()
.subscribe(
(response) => {
//do something...
}, (error) => {
console.log(`Backend returned code ${error.status}, body was: ${error.error}`);
},() => {
console.log('aging complete');
this.buildCalendar();
}
)
}
PS:getAging()在頁面加載時被調用。
而我需要初始化fullCalender,從後端(API)加載數據後。
那麼它是離子2還是離子3?而且你在離子中使用它真的很重要嗎?它是有角度的。什麼是buildCalendar,它叫什麼名字?而這個.calendarOptions是如何使用的?請提供http://stackoverflow.com/help/mcve。 – estus
@estus抱歉,我編輯我的問題。我提到了Ionic,因爲我不知道它是否有與Angular不同的操作。 –
將插件安裝到我的離子3後,我得到一個沒有這樣的文件calendar.js的問題。你是如何解決這個問題的?謝謝 – ACES