Using the ng-selected directive
<Divclass= "Form-group"> <label for= "Role"class= "Col-sm-2 Control-label">Owning permission</label> <DivID= "Roleid"class= "Col-sm-10"> <Selectclass= "Form-control input-sm"Ng-model= "Doctor.role"name= "Role"ID= "Role"> <optionng-repeat= "Role in Roles"ng-selected= "Doctor.role.id = = role.id"value= "{{role}}" >{{Role.rolename}}</option> </Select> </Div> </Div>
<Divclass= "Form-group"> <label for= "PartyId"class= "Col-sm-2 Control-label">Affiliated Companies</label> <DivID= "Party"class= "Col-sm-10"> <Selectclass= "Form-control input-sm"Ng-model= "Doctor.orgcode"name= "PartyId"ID= "PartyId"> <optionvalue= "1268" >Cpi_330048_ Power on Investment</option> <optionng-repeat= "Party in PartyList"ng-selected= "Doctor.orgcode = = Party.partyid"value= "{{Party.partyid}}" >{{Party.partyname}}</option> </Select> </Div> </Div>
AngularJS Modify operation Select to echo selected data