How can I be able to start filtering only when the querytext\'s length is equal to 2?
I have this code and I do not know how to start filtering only when querytext.l
As suggested by @Daiwei, here is what I did:
<input type="search" ng-model="querytext" ng-minlength="2">
<ul>
<li ng-repeat="value in filteredList | filter:querytext>{{value.Name}}</li>
</ul>
and it works!Thanks!
Add ng-minlength="2"
to <input>
element.
<input type="search" ng-model="querytext" ng-minlength="2" />
<!-- ^^^^^^^^^^^^^^^^ -->