Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Issue with priority of execution in filters #16001

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/content/error/filter/notarray.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,12 @@ You could as well convert the object to an array using a filter such as
{{ item }}
</div>
```

This error might occur as a type error when track by $index is used (Where the value of $index is 0 for the first element which will be used for filtering instead of the array) such as
```html
<input ng-model="search">
<div ng-repeat="item in items track by $index | filter:search">
{{ item }}
</div>
```
You can use the track by $index method at the end after using filters.