【发布时间】:2013-12-09 23:06:18
【问题描述】:
我想过滤这样的选择:
<select ng-model="test" ng-options="c as c.label group by c.type for c in columns
| filter:{c.type:'!field'} | filter:{c.type:'!map'}"></select>
编辑:添加列模型:
Columns = [
{
name: "name",
label: "Label",
info: "Information displayed in help",
type: "type",
view: "html template",
style: "min-width: 10em;",
show: true
},
{
...
}
];
列用于多种用途,为了优化我的代码,我需要它也在 Select 中,但没有类型为“字段”或“地图”的条目
然而,我可以从所有内容中进行选择,甚至包括“字段”和“地图”类型的条目。 有干净的方法吗?
【问题讨论】:
-
请发布您的模型
columns
标签: angularjs angularjs-filter