stf-input-list-filter Directive (list filtration)
Directive for filtering list item
Атрибути
- listSource - collection
- listFiltered - output filtered collection
- filterterKeys - array of key with name of field. It is the fields which will compare with inputed value
key
orkey.subKey
and etc.filtered-keys="['key', 'key.subKey']"
- placeholder - placeholder
- ngModel - ngModel
Installing
npm install --save stf-input-list-filter
Example using
; ; angular // throtle time of reaction on editing ;
<stf-input-list-filter ng-model="value" placeholder="Filter" list-source="$ctrl.addresses" limit="50" list-filtered="$ctrl.addressFiltered" filterter-keys="['description']"></stf-input-list-filter>
<ul>
<li ng-repeat="address in $ctrl.addressFiltered track by address.id">{{address.description}}</li>
</ul>