filter: notarray error in angularjs

前端 未结 1 1785
悲哀的现实
悲哀的现实 2021-02-09 16:47

http://plnkr.co/edit/cJsScs8ixF1aq85Ri7nV?p=preview

filter is not working. Other part of code also breaks. Throwing error filter:notarray. how it can be fixed

1条回答
  •  独厮守ぢ
    2021-02-09 17:29

    The documentation for ng-repeat says:

    track by must always be the last expression

    So you need to change this line:

    to this:

    I know it's obscure, and this one catches people out. Often the documentation isn't on the page you expect it to be (e.g. filter) but is still in a logical place (e.g. ng-repeat). It 'should' all be there.

    0 讨论(0)
提交回复
热议问题