ng-fullcalendar 标题有 undefined undefined in angular 5
ng-fullcalendar title have undefinedundefined in angular 5
我在 angular 5 项目中使用 ng-fullcalendar。
我使用的代码与 full-calendar 网站中提到的相同。
这是我的 npm 版本和我的代码,以便更好地查看我的问题。
package.json
这是我的 package.json 文件的一瞥
"fullcalendar": "^3.6.1",
"ng-fullcalendar": "^1.4.0",
"moment" : latest,
fullcalendar.component.html
<ng-fullcalendar #ucCalendar [options]="calendarOptions" (eventClick)="eventClick($event.detail)">
</ng-fullcalendar>
fullcalendar.component.ts
this.valuationService.getEvents().subscribe(data => {
this.events = data;
this.calendarOptions = {
editable: true,
height: 'auto',
eventLimit: false,
// defaultDate: '2016-09-12',
header: {
center: 'title ',
left: 'prev,today,next',
right: 'month,agendaWeek,agendaDay'
},
events: []
};
});
这是我面临的问题的图像,以便您更好地查看它。
我遵循了一个 github 演示并使用了相同版本的包,但我仍然遇到未定义未定义的错误。我已经遍历了堆栈中给出的所有可能的解决方案,github 等,但仍然找不到正确的方法。
虽然我找到了一个解决方案,但为此我必须更改 node_modules 文件中 fullcandar.min.js 中的一些代码。所以这样做不是很方便。
希望你能帮助我并提前致谢。
存在版本问题。
但如果使用更高版本,您将不会在生产时遇到错误。
在本地使用 ng-serve
你会得到这个错误,但使用相同的版本 ng build --prod
此问题将得到解决。
我在 angular 5 项目中使用 ng-fullcalendar。 我使用的代码与 full-calendar 网站中提到的相同。 这是我的 npm 版本和我的代码,以便更好地查看我的问题。
package.json
这是我的 package.json 文件的一瞥
"fullcalendar": "^3.6.1",
"ng-fullcalendar": "^1.4.0",
"moment" : latest,
fullcalendar.component.html
<ng-fullcalendar #ucCalendar [options]="calendarOptions" (eventClick)="eventClick($event.detail)">
</ng-fullcalendar>
fullcalendar.component.ts
this.valuationService.getEvents().subscribe(data => {
this.events = data;
this.calendarOptions = {
editable: true,
height: 'auto',
eventLimit: false,
// defaultDate: '2016-09-12',
header: {
center: 'title ',
left: 'prev,today,next',
right: 'month,agendaWeek,agendaDay'
},
events: []
};
});
这是我面临的问题的图像,以便您更好地查看它。
我遵循了一个 github 演示并使用了相同版本的包,但我仍然遇到未定义未定义的错误。我已经遍历了堆栈中给出的所有可能的解决方案,github 等,但仍然找不到正确的方法。
虽然我找到了一个解决方案,但为此我必须更改 node_modules 文件中 fullcandar.min.js 中的一些代码。所以这样做不是很方便。 希望你能帮助我并提前致谢。
存在版本问题。
但如果使用更高版本,您将不会在生产时遇到错误。
在本地使用 ng-serve
你会得到这个错误,但使用相同的版本 ng build --prod
此问题将得到解决。