How to use ng-if with ng-repeat?

后端 未结 5 1046
北恋
北恋 2020-11-30 13:40

I have a simple nav object setup that lists the nav items (and whether they should appear in the primary nav or not). It seems though when I try to mix ng-if with ng-repeat,

5条回答
  •  孤城傲影
    2020-11-30 14:18

    Instead of ng-if you should use a filter (http://docs.angularjs.org/api/ng.filter:filter) on you ng-repeat to exclude certain items from your list.

提交回复
热议问题