angular filters - How to hide a container when all entries are filtered in angularJS? -


i use filter in angularjs 1.4.3 application. if vm.nightservices filtered no entry shown (so filtered) div container should hidden. have tried ng-show="vm.nightservices.length > 0" not work.

<div ng-show="vm.nightservices.length > 0" ng-repeat="nightservice in vm.nightservices | filter:institutionofuserfilter.institutionname"> 

you can create new filtered list in ng-repeat can check length in ng-show.

<div ng-repeat="nightservice in filtered = ( vm.nightservices | filter:institutionofuserfilter.institutionname )" ng-show="filtered.length > 0"> 

Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

formula - R: how to pass in a reference to the variable in glm or lm? -