刷新屏幕后,角色UI日历不会呈现

时间:2017-11-13 11:58:54

标签: angularjs calendar angular-ui

我正在使用角度ui日历来呈现事件,当页面加载应用程序时正确呈现日历。

enter image description here

但是当我刷新屏幕时,事件阻止不会渲染。

enter image description here

我使用以下代码在UI中呈现日历。

以下是我的代码块。

function returnCalendarConfig() {
                            return {
                                calendar: {
                                    height: 500,
                                    editable: false,
                                    displayEventTime: true,
                                    selectable: true,
                                    timeFormat: 'hh:mm A',
                                    stick: true,
                                    defaultView: 'month',
                                    columnFormat: 'dddd',
                                    disableDragging: false,
                                    header: { left: 'month,agendaWeek,agendaDay', center: 'title', right: 'prev,next' },
                                    eventClick: $scope.onEventClick,
                                    dayClick: $scope.onDayClick,
                                    eventRender: $scope.onEventRender
                                }
                            };
    }

    $scope.uiConfig = returnCalendarConfig();

    function getCalendarEvents() {
         var user = commonService.getUser();
         console.log('User Object', user);
         $scope.events = [];
         $timeout(function () {
           applyScope();
         });
         commonService.hideProcessingForSiteDetails(200);
    }

    getCalendarEvents()
控制器末尾的

getCalendarEvents 方法调用。

<div class="calendar" data-ng-model="eventSources" calendar="myCalendar" ui-calendar="uiConfig.calendar">
</div>

0 个答案:

没有答案
相关问题