From f578311e8be5b78b539a82ab99d9532f9a37b63d Mon Sep 17 00:00:00 2001 From: Puneeth S Date: Sat, 20 May 2017 15:32:19 +0530 Subject: [PATCH] Issue with priority of execution in filters Need to use track by $index at the end in ng-repeat or else the filter considers $index as a value that should be filtered out. This seems to be common issue. --- docs/content/error/filter/notarray.ngdoc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/content/error/filter/notarray.ngdoc b/docs/content/error/filter/notarray.ngdoc index 4586424de118..264ac8112ed0 100644 --- a/docs/content/error/filter/notarray.ngdoc +++ b/docs/content/error/filter/notarray.ngdoc @@ -49,3 +49,12 @@ You could as well convert the object to an array using a filter such as {{ item }} ``` + +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 + +
+ {{ item }} +
+``` +You can use the track by $index method at the end after using filters.