angular-select2
angular-select2 copied to clipboard
Directive assumes that the identity field is always called "id"
Hi,
When a datasource contains objects that dont use id as the name of the id field, the ngModel is not populated. eg
[
{ key: 1, name: 'Foo'},
{ key: 2, name : 'Bar' }
]
I have gotten it to work by modifying the source, but I'm not sure if my solution is the way you want to go (added an id attribute that defaults to "id", then used that value to reference the datasource objects id field )