Angular UI-Calendar TypeError: calendar.fullCalendar is not a function

久未见 提交于 2019-12-06 04:19:58
user2313833

You should check the initCalendar and destroyCalendar methods in angular-ui-calendar/src/calendar.js. If they're creating the element by using:

angular.element(elm).html('');

Then you should replace it by:

$(elm).html('');

the problem is that angular doesn't find jquery in window.$

if you are using es6 modules:

import jquery from "jquery";

export default (window.$ = window.jQuery = jquery);

otherwise you should add js script in you index.html and before your app code:

window.$ = window.jQuery = jquery

I think you may not have correctly configured the controller for your page?

I had this same issue but using ui-router, I had the controller specified incorrectly and it wasn't being wired up. Fixing this made the calendar appear and this error go away.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!