angularjs - Angular JS - Conditional Statement for Using JSON Object in HTML Directive -
i have json object in following format:
{ filters: [ {name: "pork", active: true}, {name: "beef", active: true}, {name: "chicken", active: false} ] }
i constructing select list following:
ng-options="item.name item in filters"
i want construct option if "active" key true
. there way me in psuedo-javasscript inside of angular directive?
try ng-options="item.name item in filters | filter:{ active : true }"
.
Comments
Post a Comment