Hi,
I hope the title of the post is not too misleading...
<li ng-repeat='item in filteredItems = (items | filter:filterExpr)'>{{item}}</li>
Doing it like this does allow my to access the "filteredItems" var inside the template ({{filteredItems.length}}), but I was not able to get a hold of it inside the controller.
However, if I create a js object "var $scope.filtered={};" and then change ng-repeat to:
<li ng-repeat='item in filtered.filteredItems = (items | filter:filterExpr)'>{{item}}</li>
the $watch expression would acknowledge changes to the var and I was able to access it without any problems.
We use Angular 1.2.16 in our project. Could this be related to some setup issue?
Thanks,
Torsten.