Angularjs 角度传感器中的独特滤波器问题

Angularjs 角度传感器中的独特滤波器问题,angularjs,angularjs-filter,Angularjs,Angularjs Filter,这是我的下拉列表 <select name="EType" id="opt-type" class="form-control" ng-options="type.id as type.name for type in types" ng-disabled="!eng.adding" ng-change="TypeChange()"> <option value=""></option> </select>

这是我的下拉列表

<select name="EType" id="opt-type" class="form-control" 
        ng-options="type.id as type.name for type in types" 
        ng-disabled="!eng.adding" ng-change="TypeChange()"> 
  <option value=""></option>
</select>

我想要组合中的唯一记录我在应用过滤器后尝试了唯一文件管理器所有显示空数据的记录

有人能帮我吗。

试试“唯一”过滤器()


正如您所说,您尝试了独特的过滤器,然后它应该工作。请交叉核对以下几点:

  • 添加所需的模块
    angular.module('myApp',['ui.directive','ui.filters'])
  • 是指什么<代码>
ng-options="type in types| unique:'name'"