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

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -