ngSearchAndDestroy
Angular 1 module for fuzzy searching capabilities.
How to use this module
- use
<ng-search></ng-search>
to easily add a dropdown / text input fuzzy search field. - The directive supports these attributes:
in-data
: Acts as list input attribute. Bind any typical data array or array of objects.ext
: Ifin-data
is bound to an array of Objects, you should define the object key to be displayed in the list here.out-data
: outData acts as the output binding of the selected data or object from the list. Ifin-data
is an array of objects thenout-data
will too be an object. Ifin-data
is an array of strings then the selected string will be returned toout-data
.
Example:
JS
var dataList = name: 'Taylor' id: 1 name: 'Luke' id: 2 name: 'David' id: 3 name: 'Matt' id: 4 ;var selected = null;
HTML
<ng-search in-data="dataList" ext="name" out-data="selected"></ng-search>