I have declared a $scope variable in my controller:
$scope.filteredPayments = [];
I have an ng-repeat
in my HTML that runs the following:
ng-repeat="payment in filteredPayments = payments"
payments
is populated asynch from Parse. It works correctly and populates my table accordingly.
The following watch does not fire either:
$scope.$watch('filteredPayments', function(newValues) {
console.log(newValues);
}
Why is filteredPayments
not being updated in my controller especially since when I have no filters defined it shows all of the payments I have in my backend?
It looks like you are trying to bind payments to filter payments in the ng-repeat like
What you should do is update the $scope.filteredPayments, as that is what the repeat is being run upon. So maybe a $q promise from your parse (or whatever you prefer) and then set. Something along the lines of this (again I don't know exactly how you get your data back.
Or maybe something simple, as long as you are sure the payments variable is updated like :