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

Event source that calls a function on every view switch #342

Closed wlkerwalker closed 8 years ago

wlkerwalker commented 8 years ago

As it's been suggested on AngularUI Calendar website that I can use this function: $scope.eventsF = function (start, end, timezone, callback) {...} and add it to the $scope.eventSources and it will be called on every view switch. I added the $scope.eventsF to my $scope.eventSources but it's never updated.

What I want to achieve is the $scope.eventSources (which has $scope.events and other sources) to get updated after I fetch the events coming back from ajax call.

Please refer to this question for more details. http://stackoverflow.com/questions/33392495/angularui-calendar-event-source-that-calls-a-function-on-every-view-switch