這裏選擇的是情景默認值從服務器
我得到的數據從服務器以這種形式
$scope.data=[
{"name":"xyz","status":"pending"},
{"name":"abc","status":"completed"},
{"name":"pqr","status":"completed"}
]
這個數據是Seprate 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
使用'NG-selected'比賽,像這樣'NG-model' ........................ ........'' – cna327