Reputation: 143
I'm trying to apply a filter to a ng-repeat
. But it's not updating when my model changes.
<th ng-repeat='column in cmp.columns | filter {visible:"true"}'>
{{column.title}}
</th>
I'm getting the columns via a future in my component if thats makes any difference.
cols.getColumns().then ((columns){
this.columns = columns;
})
Upvotes: 3
Views: 293
Reputation: 143
moving the filter logic into my component:
List get visibleColumnNames => columns.where((col) => col['visible'] == true)
.map((col) => col['name']).toList();
Still would like to know how to do this in the template with a filter.
Upvotes: 1