angularjs - angular ng-repeat prefilter in javascript -


i have following angular js filter ng-repeat on tr element. how accomplish of in javascript? possible in 1 custom filter?

note: showrow function returns bool, search string string

ng-repeat="lob in filtered = (lobs | filter : showrow | filter : searchstring | orderby : 'name':true ) 

you can use $filter service, or $scope.$eval:

$filter('orderby')(     $filter('filter')(         $filter('filter')($scope.lobs, $scope.showrow),     $scope.searchstring), 'name', true);  $scope.$eval("lobs | filter : showrow | filter : searchstring | orderby : 'name':true"); 

not tested, should close enough work.

and yes, using first way, create own filter that.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -