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
I also present a workaround, but I had to hack around the fact that I wasn't using an $http promise. Might be a thought for a future enhancement to use the standard promise interface, rather than success.
The text was updated successfully, but these errors were encountered:
Feel free to send me a PR that keeps the old way working but makes your way work as well if that works? Otherwise I'l try to get something out there later this week. Thanks!
I couldn't add any really substantive unit tests because select2 doesn't expose a method of getting the data that it is bound to. I do have some isolated tests that verify promise functionality works as expected from http. Namely that success goes to the success handler of then and failure does not. So just changing success to then was all that was necessary.
Additionally, I added the ability to return an array from this, which is really the use case that I have. It's a little bit of guessing, so whether you want to document the feature or not, that's up to you.
I am unable to see the options reflect modifications to a list in the controller. A plnkr demonstrating the issue can be seen here
http://plnkr.co/edit/OIsfV0hOJfdj1dswUzgm?p=preview
I also present a workaround, but I had to hack around the fact that I wasn't using an $http promise. Might be a thought for a future enhancement to use the standard promise interface, rather than success.
The text was updated successfully, but these errors were encountered: