javascript - AngularJS Dropdown and Textbox Filter -


i have ng-repeat creates table of data. each entry has several properties, including ip address, mac address, author , more. have textbox automatically sorts ip address, want provide dropdown allows users select property filter by.

for example, default behavior typing "12" box, entries "12" in ip address displayed. if user selects "author" dropdown , types "mark" textbox, entries "mark" author displayed.

i tried setting textbox's ng-model "selectfiler.value" didn't work.

<form>     <select ng-model="selectfilter">         <option value="incident_at">incident date</option>         <option value="ip_addr" selected="selected">ip address</option>         <option value="mac_addr">mac address</option>         <option value="created_at">created on</option>         <option value="author">author</option>     <select>     <input type="text" placeholder="search ip" ng-model="filtertable.ip_addr"> </form> 

here's code, because i'm using ui-router , templates full project can't data display in plunker: http://plnkr.co/edit/knqx1g3hidem0orzssjt?p=preview

how can make work?

try using typeahead angular-bootstrap library.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -