如何在角度js中推送数据后进行验证

时间:2016-07-19 09:55:57

标签: angularjs angularjs-scope angularjs-ng-repeat

<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') });

0 个答案:

没有答案