Questions tagged [ui-select2]

An AngularJS wrapper for select2, different from jquery-select2

AngularJS wrapper for select2 (deprecated)

Instead, use angular-ui/ui-select

An AngularJS wrapper for Select2 by the AngularUI Team.

Use the tag if you are not referring to the AngularJS version.

Useful links

194 questions
0
votes
1 answer

UI-Select2 remove option from dropdown?

I am using ui-select2. I have a dropdown that has the options generated from an ng-repeat. I want to be able to click a button to remove the currently selected item from the array of items. that change is not reflection in the ui-select2 UI. Do I…
striff88
  • 97
  • 2
  • 10
0
votes
1 answer

How do I hide the select2 dropdown in angular from within query handler?

I have a select2 drop-down, called from ui-select2. I have a custom query function, which makes an ajax call. Here's my problem. If the ajax call gets a 401 - e.g. the user session was timed out - then my app-wide handler intelligently reroutes the…
deitch
  • 14,019
  • 14
  • 68
  • 96
0
votes
1 answer

Issue with my custom select2 directive for angularjs

I have created custom select2 directive for angular it works perfect for my usecase and works like charm when i use template and it sets and get the values from input/ngModel but when i use it on view page it do not resolve ngModel via scope.$eval…
0
votes
1 answer

Cannot pass Select2 parms into UI-select2

I'm trying to use the ui-select2 Angular directive, and the github repo states: All the select2 options can be passed through the directive. You can read more about the supported list of options and what they do on the Select2 Documentation Page I…
port5432
  • 5,889
  • 10
  • 60
  • 97
0
votes
3 answers

How do I traverse model data in AngularJS?

I have a dropdown with a backing JSON like this: $scope.tradestyles = [ {"id":"1","source":"Source One","name":"Name One"}, {"id":"2","source":"Source Two","name":"Name Two"} ] This is the dropdown, using select2, the model is the ID of the…
Jeroen Kransen
  • 1,379
  • 3
  • 19
  • 45
0
votes
2 answers

Can't display selected value using select2

I'm using angular-ui's select2 directive. In terms of functionality it's working fine (after some hair pulling) but I just realized that what I did to make it work is now preventing select2 from displaying the selected value.
Kiran
  • 2,997
  • 6
  • 31
  • 62
0
votes
2 answers

AngularJS, Select2 - binding true/false values in dropdown with ngDisabled

I am trying to do the following: Show a simple Yes/No dropdown (with values true and false as IDs) using Select2 Bind the value of the dropdown to a model using ngModel Enable/Disable a textbox using the true/false value Here is a plunker I have a…
Faredoon
  • 339
  • 1
  • 9
  • 18
0
votes
2 answers

ui-select2 inside directive isn't updating controller model

I have a directive that takes in a collection and builds out a dropdown. .directive("lookupdropdown", function () { return { restrict: 'E', scope: { collectionset: '=', collectionchoice: '=' }, …
yaegerbomb
  • 1,154
  • 4
  • 22
  • 37
0
votes
1 answer

Add new option for ui-select2 in angular js

I am using ui-select2 in angularjs which uses select2 plugin of jquery. I have some pre-defined list and then when i start searching for anything and if that is not found in list i want to add a new value. I am doing something like this : var…
insomiac
  • 5,648
  • 8
  • 45
  • 73
-1
votes
2 answers

Angular ui-select2 values not being detected in scope

For a bit of background, I am trying to create a simple form that will allow a user to send a message. I am using ui-select2 to allow the user to search for the message recipient, but for some reason selecting the user doesn't update the necessary…
Spacepotato
  • 146
  • 10
-1
votes
3 answers

why is select unable to display the selected values

I am unable to understand as to why the following code is unable to display the selected value. Any help is really appriciated.