'ng-repeat' How to get the `unique` values

前端 未结 4 804
遇见更好的自我
遇见更好的自我 2020-12-10 04:13

Using an array, I am trying to filter and show the unique information in the list. For that I use the angular inbuild filter method.

4条回答
  •  猫巷女王i
    2020-12-10 04:48

    AngularJS doesn't include a unique filter by default. You can use the one from angular-filter. Just include the JavaScript

    
    

    and include the dependeny in your app:

    var app = angular.module('myApp', ['angular.filter']);
    

    Your code should work right away! I edited your Plunker so it works.

提交回复
热议问题