Angular Filter - With ControllerAs Syntax Not Working
I have this in html code:
Solution 1:
If you want get filtered result but do not want to break original array you can use 'as'
operation for ng-repeat
...
<md-list>
<md-list-item ng-repeat="schema in dash.items | filter: {name: dash.schemaListFilter} | orderBy: 'schema.id' as filteredData">
<h4>{{ ::schema.name }}</h4>
</md-list-item>
</md-list>
<div ng-show="filteredData.length">Empty</div>
so whenever you change your filter query the result will be set to 'filteredData' so you can use this array properties to achieve what you want...
Post a Comment for "Angular Filter - With ControllerAs Syntax Not Working"