下面的代码是我使用 angularjs 的新应用程序的示例代码。我集成了 ui-calendar 并在其中进行了一些自定义。我试图从服务器获取数据并在 ui-calendar 中显示。数据正在使用 angularjs http 请求获取,但日历没有显示其中的任何数据。当我删除 http 请求成功调用虚拟数据正常工作时。在下面的代码 loaddata iam 在成功调用中调用时,我保留事件源以在日历中添加数据。但没有数据显示。我如何使用角度将数据放入 ui-calendar 的 http 请求。请提前谢谢,我正在使用 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 {
}