We are using ui-select for the input boxes in our application.Please find below issue which we are facing.
<ui-select-choices repeat="user.firstname as user in users" refresh="pvm.peopleSuggest($event, $select.search, 'userId')" refresh-delay="200" >
<div>{{user.firstname}} {{ user.lastname}}</div>
</ui-select-choices>
In the above html you can see we need firstname and lastname of an object to bind to ng-model. I have gone through this link angular- ui-select - how to bind object property to ng-model as this one tells about how to bind single property to an object, but we need multi property to bind to ng-model.
This is my json data :
{
"p_err_code":"success",
"count":1,
"users": [
{"objectType":"user","user_id":"emea\\gaurapan","firstname":"Pandey","lastname":"Gaurav","designation":"External","status":"disabled","imagename":" ","type":"NONE"},
{"objectType":"user","user_id":"sdf\\sdf","firstname":"sdf","lastname":"rtrty","designation":"External","status":"disabled","imagename":" ","type":"NONE"},
]
}
This is my sample json
let me know if my question is unclear.