I have a select2 directive for a multiple select of countries with a custom query to grab the data:
// Directive
As requested by ProLoser here is a demo and github ticket.
Demo: http://plnkr.co/edit/DgpGyegQxVm7zH1dZIJZ?p=preview
GitHub Issue: https://github.com/angular-ui/angular-ui/issues/455
Following ProLoser's advice I started using select2's initSelection function:
initSelection : function (element, callback) {
callback($(element).data('$ngModelController').$modelValue);
},
It does the trick but still feels like a workaround.
Have you tried initialising your options as:
<option selected value="0">Name</option>