You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 5, 2018. It is now read-only.
When a select2 directive is bound to a model that contains data, i.e. $scope.countries = [{id: 'US', text: 'United States'}], the initial value of the select2 will be set to [Object object]
To work around this I am manually grabbing the model value in an initSelection function passed in with the other select2 options.
initSelection : function (element, callback) {
callback($(element).data('$ngModelController').$modelValue);
},
AngularUI is currently undergoing a restructure. This project will no longer hold the codebase, can you please relocate this to https://github.com/angular-ui/ui-select2 (after confirming it's still necessary with the latest code)?
When a select2 directive is bound to a model that contains data, i.e.
$scope.countries = [{id: 'US', text: 'United States'}]
, the initial value of the select2 will be set to[Object object]
To work around this I am manually grabbing the model value in an initSelection function passed in with the other select2 options.
Here is a demo displaying the issue:
http://plnkr.co/edit/DgpGyegQxVm7zH1dZIJZ?p=preview
And here is my original SO question.
http://stackoverflow.com/questions/14985346/setting-initial-values-of-angular-ui-select2-multiple-directive
The text was updated successfully, but these errors were encountered: