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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -