2016-04-26 41 views
0

以下代碼之後angularjs ui-calendar是我的新應用程序使用angularjs.I集成ui-calendar的示例代碼,並在其中完成了一些定製.Iam嘗試從服務器獲取數據並在ui中顯示-calendar.Data使用angularjs http請求獲取,但日曆不顯示任何數據。當我刪除該請求成功調用虛擬數據正常工作。在下面的代碼loaddata iam調用內部成功調用,那裏我保持eventsource添加在calendar.but數據沒有數據displaying.how我用角HTTP請求擺在UI-calendar.Please數據,在此先感謝,還有一兩件事是我使用fullcalendar如何刷新從服務器

$scope.eventSources2 = []; 
if ($rootScope.checkConnection()) { 
    apiFactory.getData() 
     .success(function(res) { 
      LoadData(res.data); // <- this is function which is calling to display data in calendar 
      console.log(res); 
     }) 
     .error(function(e){ 
      console.log('check error log'); 
      console.log(e); 
     }); 
} else { 
} 

回答

0

當你定義您在你的html中的ui-calendar應該有一個ng模型。 你應該在你的LoadData函數中進行更新,那個變量和Angular會做的。

+0

是的,我有這樣的行 –

+0

+0

$ scope.eventSources2 = [NEWVALUE] value this eventsource2還顯示何時使用{{}}在視圖 –

0

uiCalendarConfig.calendars ['myCalendar3']。fullCalendar('addEventSource',$ scope.calEventsExt);這裏mycalendar3是

希望這個答案將幫助那些誰也掙扎在這個...

+0