I have a controller
app.controller('cartCtrl', function($scope) {
$scope.$on('updateCart', function(event, cart) {
$scope.cart = cart;
});
$scope.myFilter = function(item) {
console.log(item);
};
});
The view which is loaded by routes :
<div class="shopping-row" data-ng-repeat="item in cart.items | filter:myFilter">
<div>
Now the problem is that myFilter is not triggred. If I call filter:myFilter()
it gets triggered but value isn't passed.
I fail to see why this isn't working. Any help appreciated.