It seems you want to reuse the filtered values ββfrom the filter? Right?
If you only need to do this:
<ul ng-after-list-filter> <li ng-repeat="item in filteredData = (items | filter:activeFilter.filterType)">{{item}}</li> </ul> <div ng-repeat="item in filteredData">{{item}}</div>
I wish I could take advantage of this, but this is a trick I saw in another StackOverflow question that I cannot find now.
Then, to find out when this was updated, you will look at filteredData in the area:
myModule.directive('ngAfterListFilter',function(){ return { restrict: 'A', link: function(scope,element,attrs) { scope.$watch('filteredData', function(val) { console.log('do something here'); }); } } });
source share