I am new to Javascript & AngularJS. I have a scenario as below:
$http.get('URL').success(function(data){
$scope.data = data;
});
$.fullCalender({
calendarData: $scope.data
});
In above code, I get blank for 'calendarData'
But I can resolve above issue as below:
$http.get('URL').success(function(data){
$.fullCalender({
calendarData: data
});
});
So, my doubt is: When we can resolve issue as above, why people go for promises. Sorry if its a dumb query.