Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'm trying to implement AngularJS + Select2 with Multiple selection enabled.

When I include the full angular-ui package, it works, however I do not want to use the full version.

So, I tried to do the same, but just including the ui-select2 module itself and I got surprised that the initSelection does not works this way.

I have prepared 2 Plunker's to illustrate both tries, the first, that does not work, shows the include of only ui-select2 module and the second example, that works, includes the full angular-ui package.

1º Example (does not work) http://plnkr.co/edit/YOrzQKGx3py24Lf3JQ2Z?p=preview

2º Example (works) http://plnkr.co/edit/ZeYgJyLHo30hTi2DerJZ?p=preview

Click on the 'set selected' button, below the select2.

After dealing with this for about 12 hours I'm stuck. Would any angularjs+angular-ui Guru knows what is going on here?

I need to make this work with only ui-select2.js, so I need the Example 1 working.

Any ideas?

Thank you very much.

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.