最好的解决方案是通过角度
$index作为目标,即对象在数组中的索引/位置。
HTML
<div ng-app='app' ng-controller="selectFilter"> <ul> <li ng-repeat="filter in filters" ng-click="select($index)" ng-> <span ></span> {{filter.time}} </li> </ul></div>JS /控制器
var app = angular.module('app', []);app.controller('selectFilter', function($scope) {var filters = [ { 'filterId': 1, 'time': 'last 24 hours', }, { 'filterId': 2, 'time': 'all', }, { 'filterId': 3, 'time': 'last hour', }, { 'filterId': 4, 'time': 'today', }, { 'filterId': 5, 'time': 'yersteday', } ]; $scope.filters = filters; $scope.selected = 0; $scope.select= function(index) { $scope.selected = index; };});JSFIDDLE



