angular-calendar subFn 不是函数
angular-calendar subFn is not a function
我在使用 angular 5 日历组件时遇到问题 https://mattlewis92.github.io/angular-calendar
日历呈现完美,包括事件等。
但是,使用 mwlCalendarPreviousView 和 mwlCalendarNextView 指令不起作用。
点击 then do 报如下错误:
ERROR TypeError: subFn is not a function
at CalendarPreviousViewDirective.onClick (angular-calendar.js:239)
at Object.eval [as handleEvent] (PlanningOverview.html:58)
at handleEvent (core.js:13581)
at callWithDebugContext (core.js:15090)
at Object.debugHandleEvent [as handleEvent] (core.js:14677)
导航到 onClick 方法的源代码显示以下内容:
/**
* @hidden
* @return {?}
*/
CalendarNextViewDirective.prototype.onClick = function () {
var /** @type {?} */ addFn = {
day: addDays,
week: addWeeks,
month: addMonths
}[this.view];
this.viewDateChange.emit(addFn(this.viewDate, 1));
};
return CalendarNextViewDirective;
这说明subFn确实不是函数
我一定是做错了什么,但我找不到什么...
(我在 Angular 5.0.00 上使用 angular-日历 0.23.2)
我在使用 Angular 6 和 angular-calendar 0.25.2 时遇到了同样的问题。我错误地设置了 [view]
属性。我有 [view]="month"
,但是 [view]
必须设置为 controller
中的一个变量,例如在 HTML: [view]='myView'
和控制器中 myView: string = 'month'
[view]="month" 更改为 view="month"
我在使用 angular 5 日历组件时遇到问题 https://mattlewis92.github.io/angular-calendar
日历呈现完美,包括事件等。 但是,使用 mwlCalendarPreviousView 和 mwlCalendarNextView 指令不起作用。
点击 then do 报如下错误:
ERROR TypeError: subFn is not a function
at CalendarPreviousViewDirective.onClick (angular-calendar.js:239)
at Object.eval [as handleEvent] (PlanningOverview.html:58)
at handleEvent (core.js:13581)
at callWithDebugContext (core.js:15090)
at Object.debugHandleEvent [as handleEvent] (core.js:14677)
导航到 onClick 方法的源代码显示以下内容:
/**
* @hidden
* @return {?}
*/
CalendarNextViewDirective.prototype.onClick = function () {
var /** @type {?} */ addFn = {
day: addDays,
week: addWeeks,
month: addMonths
}[this.view];
this.viewDateChange.emit(addFn(this.viewDate, 1));
};
return CalendarNextViewDirective;
这说明subFn确实不是函数
我一定是做错了什么,但我找不到什么...
(我在 Angular 5.0.00 上使用 angular-日历 0.23.2)
我在使用 Angular 6 和 angular-calendar 0.25.2 时遇到了同样的问题。我错误地设置了 [view]
属性。我有 [view]="month"
,但是 [view]
必须设置为 controller
中的一个变量,例如在 HTML: [view]='myView'
和控制器中 myView: string = 'month'
[view]="month" 更改为 view="month"