Can I use ctrlAs syntax rather than using $scope for config and events objects?
I am having an issue with the following pseudo code
// html
<daypilot
- scheduler id="dp" config="ctrl.dpConfig" events="ctrl.dpEvents"></daypilot-scheduler>
// controller
var ctrl = this;
ctrl.dpConfig = {config options};
ctrl.dpEvents = [];
$http.get('/endpoint').then(function(result) {
$scope.dp.resources = result.data.resources;
$scope.dp.events.list = result.data.events;
$scope.dp.update()
});
The events get rendered as expected but if I then try and move one the UI doesn't update. If I put a $scope.dp.update() inside the onEventMove callback it works but I shouldn't have to do this should I?
It seems that using $scope.dp.events.list doesn't push the data onto my ctrl.dpEvents object?