<select class="form-control input-sm text-uppercase" id="ddlUsers" data-ng -model="UserName" >
<option data-ng-repeat="List in Users" value="{{List.Value}}" ng-options="">{{List.Name}}
</option>
</select>
控制器代码
var Users = [], filterCondition=[];
$(res).find('NewDataSet Table4').each(function () {
Users.push({
Value: $(this).find('UserId').text(),
Name: $(this).find('Name').text()
});
});
$scope.Users = Users;
$scope.UserName = $scope.Users[0].Value;
我想根据等于以下代码的值显示选择文本
filterCondition.push({ operator: localStorage.getItem('UserId') });