I have a problem here, I'm trying to load an event when the view changes using the synchronization point. Changing the synchronization point works fine, I can also send and receive information. But the calendar is still freezing, I have to change a few months before it starts working again. Then I can return to the previous month. I use AngularJS to load the event and $q to load the data before the request:
$q(function(resolve, reject) { resolve(beforeSendStatus()); }).then(function() { EventService.get({ start: moment(start).format("DD-MM-YYYY"), end: moment(end).format("DD-MM-YYYY"), format: 'FC', onlyMe: false }).then(function(data) { $('.status').find('i').removeClass("fa-spin fa-circle-o-notch").addClass('fa-check'); //TODO trouver un autre moyen que le addEventSource, ca fait bugger le calendrier. Calendar.fullCalendar('renderEvents', data.data); console.log('revenue bouge esti'); eventLenghtCalc(view, 325); console.log('yes'); }, function(error) { $('.status').find('i').removeClass("fa-spin fa-circle-o-notch").addClass('fa-close').css({ 'color': 'red' }); toastr.error(error.data); }); })
If I delete the part with $q , it works well. Have any of you had problems with the async function in the viewRender callback?
Thank you, we have a great day!
ps. the beforeSendStatus() function only changes the icons for the counter.
javascript jquery angularjs asynchronous fullcalendar
Nicolas
source share