javascript - AngularJS Filter search with empty filter -
i have problem.
i made filter search, , when input dirty empty, none elements show, wanna show when filter empty.
<div class="zc-select" target="selectedcountry"> <div class="principal-select" ng-click="openselect($event)"> <div ng-show="selectedcountry.length === 0"> select country </div> <div ng-show="selectedcountry.length > 0"> {{selectedcountry[0].name}} </div> <i class="fa fa-chevron-down"></i> </div> <div class="select-search"> <i class="fa fa-search"></i> <input placeholder="want search?" max-length="44" only-text ng-model="countryfilter"> </div> <ul class="select-elems"> <li ng-repeat="i in countries | filter:countryfilter" select-id="{{i.id}}" ng-click="setselect(i); profile_info.$dirty = true">{{i.name}}</li> </ul> </div>
Comments
Post a Comment