gpt4 book ai didi

angular - ng-fullcalendar 标题在 Angular 5 中未定义未定义

转载 作者:行者123 更新时间:2023-12-02 02:43:22 24 4
gpt4 key购买 nike

我在我的 Angular 5 项目中使用 ng-fullcalendar。我使用了与全日历网站中提到的代码相同的代码。这是我的 npm 版本和我的代码,以便更好地查看我的问题。

package.json

这是我的 package.json 文件的一瞥

"fullcalendar": "^3.6.1",
"ng-fullcalendar": "^1.4.0",
“时刻”:最新的,

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: []
};
});

这是我面临的问题的图像,以便您更好地了解它。 enter image description here

我遵循了一个 github 演示并使用了相同版本的包,但我仍然遇到未定义未定义的错误。我已经遍历了堆栈、github 等中提供的所有可能的解决方案,但仍然找不到正确的解决方案。

虽然我找到了一个解决方案,但为此我必须更改 node_modules 文件中的 fullcandar.min.js 中的一些代码。所以这样做不是很方便。希望您能帮助我,在此先感谢您。

最佳答案

存在版本问题。

但如果使用更高版本,您将不会在生产中遇到错误。

在本地使用 ng-serve 你会得到这个错误但是使用相同的版本 ng build --prod这个问题将得到解决。

关于angular - ng-fullcalendar 标题在 Angular 5 中未定义未定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57725162/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com