FullCalendar中的DayClick函数AngularJs仅适用于第一次

时间:2014-08-27 15:51:39

标签: angularjs fullcalendar

我正在fullcalendarjs打开一个带有dayclick函数的模态窗口,方法是在打开模态窗口时将标志设置为true,并在关闭窗口时将其设置为false。当我点击但没有再次工作时,它第一次工作完美。我做错了什么?

这是我的控制器SNIPPET

$scope.closeAgenda = function () {
    $scope.isModalAgendaActive = false;
};

$scope.openAgenda = function (event) {
    $scope.isModalAgendaActive = true;
}


    $scope.uiConfig = {
              calendar:{
                height: 450,
                editable: true,
                header:{
                  left: 'prev,next',
                  center: 'title',
                  right: 'month agendaWeek agendaDay'
                },
                //dayClick: $scope.openAgenda,
                dayClick: function() {
                  $scope.$apply(function (){
                      $scope.openAgenda()    
                  });
                },
                //$scope.alertEventOnClick,
                eventDrop: $scope.alertOnDrop,
                eventResize: $scope.alertOnResize,
                viewRender: $scope.renderView
              }
            };

这是模态窗口的html

<div id="modal-Agenda-background" class="modal-background" ng- show="isModalAgendaActive"></div>
<div id="modal-agenda-content"  class="agenda-modal-content" ng-show="isModalAgendaActive" >
   <img id="modal-agenda-close" class ="modal-close" ng-click="closeAgenda()" height="30px" width="30px" ng-src="{{modalCloseImage}}">
   <div id="agenda-container" style="width:100%;height:100%;margin-top: -50px;" ng-  include="Url"></div>

0 个答案:

没有答案