我在这里遇到了很大的问题。我使用 ocLazyLoader 加载完整的日历,它运行良好,但是当我尝试包含 fullCalendar-scheduler 时,我在 JavaScript 中遇到了这个错误。
Uncaught TypeError: Cannot set property 'schedulerVersion' of undefined
看起来它无法$.fullCalendar
在插件的源代码中设置变量等于。
以下是我实例化文件的方式:
resolve: {
resources: function($ocLazyLoad) {
return $ocLazyLoad.load([
ASSETS.forms.multiSelect
])
},fullCalendarScheduler: function($ocLazyLoad){
return $ocLazyLoad.load([
ASSETS.core.moment,
ASSETS.extra.scheduler,
]);
},
fullCalendar: function($ocLazyLoad){
return $ocLazyLoad.load([
ASSETS.extra.fullCalendar
]);
},
}
我也在控制器中传递了正确的值。
controller('AccueilCtrl', ['$scope', '$filter', 'fullCalendar', 'fullCalendarScheduler', function($scope, $filter, fullCalendar, fullCalendarScheduler) {
有想法该怎么解决这个吗?