Filtering by Multiple Specific Model Properties in AngularJS (in OR relationship)

前端 未结 13 2608
北恋
北恋 2020-11-22 17:08

Take a look at the example here: http://docs.angularjs.org/api/ng.filter:filter

You can search by any of the phone properties by using

13条回答
  •  青春惊慌失措
    2020-11-22 17:58

    I like to keep is simple when possible. I needed to group by International, filter on all the columns, display the count for each group and hide the group if no items existed.

    Plus I did not want to add a custom filter just for something simple like this.

            
                

    USA ({{fusa.length}})

    {{$index + 1}}

    International ({{fint.length}})

    {{$index + 1}}

提交回复
热议问题