angular-ui / ui-calendar

A complete AngularJS directive for the Arshaw FullCalendar.
http://angular-ui.github.io/ui-calendar/
MIT License
1.49k stars 729 forks source link

uiCalendarConfig.calendars undefined #296

Open AnilKumarSamal opened 9 years ago

AnilKumarSamal commented 9 years ago

Hi, I have taken the latest calendar.js from github but the below code throws error. $scope.changeView = function(view,calendar) { uiCalendarConfig.calendars[calendar].fullCalendar('changeView',view); }; Can someone guide me how to resolve the issue?Error is: TypeError: Cannot read property 'calendars' of undefined

LeonardoGuimaraes commented 8 years ago

I know the post is old, but I found a possible solution! In my case the problem was that I was calling the fullCalendar function before it is loaded and rendered the view! If you call the function after loading you won't have a problem! Hope it helps!