Vote count:
0
I have a node server that sends a csv file to the client when I hit the /scheduleE
route. In my controller I hit this route and update the scope. I'd like the scope on the page to update.
app.controller('ETableCtrl', function($scope){
$scope.payments = []
$scope.$watch('payments', function(){
console.log('value changed!')
})
d3.csv('/scheduleE', processData('01/01/14'), function(payments){
$scope.payments = payments;
console.log($scope.payments);
})
})
In the view $scope.payments
stays and empty array and "value changed!" only logs once, at the beginning. $scope.watch("payments")
does not update in the view. It remains an empty array.
However, the code logs out the array of objects to the console. Why won't my scope update in the view?
asked 1 min ago
scope not updating after loading csv file with d3
Aucun commentaire:
Enregistrer un commentaire