Unable to set selected value in AngularJS -
i have several select boxes on edit form, when page loads data loaded it, works textboxes , checkboxes not selectboxes, unable set selected value them have googled many things still cannot seem find doing wrong, html: <div class="form-group" ng-init="getroles()"> <label for="roles">role</label> <select style="width: 100%;" data-toggle="select2" ng-model="form.role_id" ng-options="item.id item.role item in roles"> </select> </div> this function gets , sets user info in controller: $scope.getuserinfo = function() { userservice.get($stateparams.id) .success(function (data, status, headers, config) { if (data.user != undefined) { $scope.form = data.user; } }) }; this function gets , sets roles in controller: $scope.getroles = function() { roleservice.get() .success(function...