Hello,
I am making this tutorial: http://code.daypilot.org/38221/angularjs-scheduler-tutorial
I can display the scheduler and load the resources from an external server that returns json values by other way I can't load events to the scheduler, the $scope.scheduler variable appears to be undefined when I debug it using Chrome dev. console. Here is some of my code:
Ctrl.js
$timeout(function() {
loadResources();
loadEvents($scope.scheduler.visibleStart(), $scope.scheduler.visibleEnd()); // here it says scheduler is undefined
});
View.html
<div ng-app="MyApp" ng-controller="Ctrl" >
<daypilot
- scheduler id="scheduler" daypilot-config="schedulerConfig" daypilot-events="events" ></daypilot-scheduler>
</div>
Let me know what could be my error, maybe the scheduler view is not complete before my script is executed, it's driving me crazy.