angular-ui / ui-calendar

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

If I use a URL as event source, it is requested again and again #319

Open cndreiter opened 9 years ago

cndreiter commented 9 years ago

The calendar does not stop requesting it.

All I do is set eventSources in controller:

this.eventSources = ['/api/events']

My browser almost freezes because of the heavy load.

Callstack:

...
XHR finished loading: GET "http://localhost:3000/api/events?start=2015-09-06&end=2015-09-13&_=1441909512773".send
@ jquery.js:8630jQuery.extend.ajax
@ jquery.js:8166_fetchEventSource
@ fullcalendar.js:9060fetchEventSource
@ fullcalendar.js:8940fetchEvents
@ fullcalendar.js:8934fetchAndRenderEvents
@ fullcalendar.js:8114refetchEvents
@ fullcalendar.js:8083(anonymous function)
@ fullcalendar.js:37jQuery.extend.each
@ jquery.js:374jQuery.fn.jQuery.each
@ jquery.js:139$.fn.fullCalendar
@ fullcalendar.js:29eventSourcesWatcher.onChanged
@ calendar.js:274applyChanges
@ calendar.js:143(anonymous function)
@ calendar.js:161Scope.$digest
@ angular.js:14308Scope.$apply
@ angular.js:14571(anonymous function)
@ calendar.js:30buildEventFromInput
@ fullcalendar.js:9324(anonymous function)
@ fullcalendar.js:8955$.ajax.$.extend.success
@ fullcalendar.js:9068fire
@ jquery.js:3099self.fireWith
@ jquery.js:3211done
@ jquery.js:8264(anonymous function)
@ jquery.js:8605

XHR finished loading: GET "http://localhost:3000/api/events?start=2015-09-06&end=2015-09-13&_=1441909512774".send
@ jquery.js:8630jQuery.extend.ajax
@ jquery.js:8166_fetchEventSource
@ fullcalendar.js:9060fetchEventSource
@ fullcalendar.js:8940fetchEvents
@ fullcalendar.js:8934fetchAndRenderEvents
@ fullcalendar.js:8114refetchEvents
@ fullcalendar.js:8083(anonymous function)
@ fullcalendar.js:37jQuery.extend.each
@ jquery.js:374jQuery.fn.jQuery.each
@ jquery.js:139$.fn.fullCalendar
@ fullcalendar.js:29eventSourcesWatcher.onChanged
@ calendar.js:274applyChanges
@ calendar.js:143(anonymous function)
@ calendar.js:161Scope.$digest
@ angular.js:14308Scope.$apply
@ angular.js:14571(anonymous function)
@ calendar.js:30buildEventFromInput
@ fullcalendar.js:9324(anonymous function)
@ fullcalendar.js:8955$.ajax.$.extend.success
@ fullcalendar.js:9068fire
@ jquery.js:3099self.fireWith
@ jquery.js:3211done
@ jquery.js:8264(anonymous function)
@ jquery.js:8605

XHR finished loading: GET "http://localhost:3000/api/events?start=2015-09-06&end=2015-09-13&_=1441909512775".send
@ jquery.js:8630jQuery.extend.ajax
@ jquery.js:8166_fetchEventSource
@ fullcalendar.js:9060fetchEventSource
@ fullcalendar.js:8940fetchEvents
@ fullcalendar.js:8934fetchAndRenderEvents
@ fullcalendar.js:8114refetchEvents
@ fullcalendar.js:8083(anonymous function)
@ fullcalendar.js:37jQuery.extend.each
@ jquery.js:374jQuery.fn.jQuery.each
@ jquery.js:139$.fn.fullCalendar
@ fullcalendar.js:29eventSourcesWatcher.onChanged
@ calendar.js:274applyChanges
@ calendar.js:143(anonymous function)
@ calendar.js:161Scope.$digest
@ angular.js:14308Scope.$apply
@ angular.js:14571(anonymous function)
@ calendar.js:30buildEventFromInput
@ fullcalendar.js:9324(anonymous function)
@ fullcalendar.js:8955$.ajax.$.extend.success
@ fullcalendar.js:9068fire
@ jquery.js:3099self.fireWith
@ jquery.js:3211done
@ jquery.js:8264(anonymous function)
@ jquery.js:8605
...