这是场景
我以这种形式从服务器获取数据
$scope.data=[
{"name":"xyz","status":"pending"},
{"name":"abc","status":"completed"},
{"name":"pqr","status":"completed"}
]
此数据是针对不同状态的单独 GET 调用
$scope.statusValues=[
{"statusName":"pending","id":"1"},
{"statusName":"completed","id":"2"},
{"statusName":"cancelled","id":"3"},
{"statusName":"custom","id":"4"}
]
在 HTML 中:-
<div ng-repeat="t in data">{{t.name}}</div>
如何使用更多 $scope.statusValues 在 Select 方法中显示 t.status 值