下面的代码是我使用angularjs的新应用程序的示例代码。我集成了ui-calendar并在it.Iam中做了一些自定义,尝试从服务器获取数据并显示在ui- calendar中。使用angularjs http请求获取数据,但it.when中没有显示任何数据。我删除了http请求成功调用伪数据在代码加载数据iam调用内部成功调用,在那里我保留eventsource在calendar.but中添加数据没有数据是displaying.how我使用angular http请求将数据放入ui-calendar中。请提前感谢,还有一件事是我正在使用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 {
}发布于 2016-04-26 17:04:25
当您在html中定义ui-calendar时,应该有一个ng-model。你应该在你的LoadData函数中进行更新,这个变量和角度就可以了。
发布于 2016-04-28 14:43:44
uiCalendarConfig.calendars'myCalendar3'.fullCalendar('addEventSource',$scope.calEventsExt);这里的mycalendar3是
希望这个答案能帮助那些在这个问题上苦苦挣扎的人……
https://stackoverflow.com/questions/36859882
复制相似问题