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
5
votes
3 answers

Angular ui-select error: 404 (Failed to load template)

Anyone having issue using angular-ui-select? Getting this error GET http://localhost/select2/select.tpl.html 404 (Not Found) angular.js:8539 Error: [$compile:tpload] Failed to load template: select2/select.tpl.html From the documentation - i just…
Linc Abela
  • 797
  • 2
  • 12
  • 26
5
votes
3 answers

How to initialize a select2 disabled

I have a simple select2 init which I want to be disabled by default without chaining a .select2("enable", false) afterwards. HTML:
DonJuwe
  • 4,477
  • 3
  • 34
  • 59
5
votes
1 answer

How to add placeholder for select2?

Yeah we can add placeholder to select2 like this, $("#e2_2").select2({ placeholder: "Select a State" }); But I need something like this, Here you can see linkedin provides "Type another area of expertise". Means when you select expertise again it…
Ashwini
  • 2,449
  • 2
  • 29
  • 42
4
votes
1 answer

Angular ui-select2 "Add" button inside dropdown list

How can I insert a button inside the dropdown list in ui-select2? Tried to search but can't find any. Sample image. See ui-select2 documentation. https://github.com/angular-ui/ui-select
aldesabido
  • 1,268
  • 2
  • 17
  • 38
4
votes
0 answers

ui select change from btn-default to btn-primary

I'm using ui-select-directive (angular-ui/ui-select) with the bootstrap-theme. for displaying the select-control it uses the btn-default-class. I would prefer to use the btn-primary-class. when i open the Debugger inside my browser and Switch the…
Tobias Koller
  • 2,116
  • 4
  • 26
  • 46
4
votes
0 answers

Optgroups with ui-select (new version) when actual options are below what should be used for optgroups

I'm using UI-Select (select2 theme) with an array of data which is returned in the following form: Array of Objects [ 0: Object { category: "Category name, to be used as optgroup label", options: [ 0: Object { …
4
votes
1 answer

ng-disabled option in angular ui-select shrinks the text box

I am using angular ui-select directive and trying to disable it with ng-disabled option.
swe
  • 143
  • 3
  • 11
4
votes
2 answers

Set ng-selected in angular-ui select

My HTML code:
spyderReloaded
  • 155
  • 2
  • 13
4
votes
3 answers

How to disable remove icon in ui-select2

Is there a way to disable the icons in ui-select2? I am using ui-select2 in angular js, which is like adding tags while posting a question on stackoverflow: How can I disable remove icon conditionally?
user2901948
  • 43
  • 1
  • 3
4
votes
1 answer

vendor css with images not available after concat and minify

I am using select2 in angular project (using yeoman). Select2 css is in the following dir: bower_components/select2/select2.css bower_components/select2/select2.png The css is using the select2.png in the following way: background-image:…
Roi Ezra
  • 506
  • 1
  • 5
  • 11
3
votes
1 answer

Select2 initSelection element Val

I am using the select2 control on my web aplciation. In the initSelection I am passing the element.val() to a controller but it is null. How would I set element.val() that i want pass to the Url.Action. Is element.val() the correct object that I…
Jefferson
  • 173
  • 2
  • 12
  • 32
3
votes
3 answers

InitSelection not work in Select2 4.0.3 js

I am using select2, everithing working fine but default selection not work, I am using select2 4.0.3 js I am using initSelection, but its display like this screenshot, var data = ; function templateResult(node) { var…
3
votes
1 answer

How to dynamically change the URL in Select2 using AJAX?

I am using ui-select2 in angularjs for remote data access. I am having a drop down, based on the value chosen in dropdown the URL present in the ajax call should change dynamically , so that I can get the data from that particular URL. Is it…
Deepa Mani
  • 281
  • 2
  • 5
  • 14
3
votes
1 answer

Select2 custom message formatting

I am using Select2 Version 3.5.2 and need to trigger a custom message if my AJAX result length is greater than x. How can you trigger a custom message which I can handle in the same way like given messages formatting messages (formatLoadMore,…
DonJuwe
  • 4,477
  • 3
  • 34
  • 59
3
votes
1 answer

programmatically selected option is not highlighted in ui-select

angular version: AngularJS v1.3.6 http://github.com/angular-ui/ui-select : Version: 0.8.3 var p1 = { name: 'Ramesh', email: 'Ramesh@email.com', age: 99 }; $scope.people = [ { name: 'Amalie', email: 'amalie@email.com', …
praveenpds
  • 2,936
  • 5
  • 26
  • 43
1
2
3
12 13