AngularJS UI-calendar not updating events on Calendar

前端 未结 11 2329
[愿得一人]
[愿得一人] 2020-12-10 04:52

I am using Angular UI-Calendar to show some events on the Calendar. The events are showing fine on the Calendar. But when I update any event\'s details, the event\'s detail

11条回答
  •  一向
    一向 (楼主)
    2020-12-10 05:22

    According to ui-calendar code, it does actually watch eventSources but never the actual individual sources. So doing a push to, let's say $scope.events ($scope.eventSources = [$scope.events]), will never trigger anything.

    So push events to $scope.eventSources[0]

    $scope.eventSources[0].splice(0, $scope.eventSources[0].length);
    $scope.eventSources[0].push({
     title : title,
     start : start,
     end : end                    
    });
    

提交回复
热议问题