c# - How to attach id to ng-model dynamically -


<select class="form-control" select-multiple-picker multiple data-max-options="2" ng-model="userdetails.clinicalroles" name="createuserselectclinicalroles" id="createuserselectclinicalroles">     <option ng-repeat="role in clinicalrole" value="{{role.description}}">{{role.description}}</option> </select> 

here getting data server list, showing {{role.description}} user, when submit need attach role.id , role.description ng-model calling api.

you can ng-options , select as: https://docs.angularjs.org/api/ng/directive/ngoptions


Comments