Tagged Questions
0
votes
1answer
231 views
Default value on a Select2 with an ng-repeat with data coming from an API call
I have an angular select2 as follows:
<select ui-select2 id="clientID" name="clientID" ng-model="newTicket.clientstate" ng-required="true">
<option ng-repeat="item in clients track by ...
0
votes
1answer
39 views
select2 tags with restangular response
How would I pass tags to select2 if the object comes from restfull API using restangular
So I have the following markup
<input type="hidden" ui-select2="select2Options" style="width:100%" ...
1
vote
3answers
60 views
AngularJS Select other option and get value from textbox
Using AngularJS I have a list of selected option and one additional "New" option. What I am trying to do is, when "New" option is chosen it will show a text-box to add a new value.
<select ...
1
vote
0answers
67 views
Setup for using Select2
I am trying to use Select2 along with AngularJs.
I am stuck at achieving two-way data binding using ng-model directive for select2. Also other directives like ng-change is also not working for me.
...
0
votes
1answer
716 views
Using AngularJS and Select2
I'm trying to use select2 tags drop-down.
I call the API which sends me data. I put the data into select2 like this :
AssignmentProvider.getStudentsInCourse(COURSENAME,SEMESTER)
...
0
votes
0answers
46 views
Using ng-model with Select2 is not updating the model value
I am using angular ng-model for select2 for data binding.
{{number.text}}
<select id="e2" ui-select2 ng-model="select2.text" data-placeholder="Pick a number">
...
0
votes
1answer
74 views
Multiple select2 angularUI load remote data
I have an issue with loading remote data in multiple select2. My code is
var fetchGroups = function (queryParams) {
console.log(JSON.stringify(queryParams));
return ...
1
vote
1answer
92 views
AngularJs Select2 multiple: ng-selected does not work
I'm using the following piece of code to select item if it is present in filters
<div ng-repeat="category in categories.data" ng-model="div1">
<div ng-repeat="(key, ...
1
vote
0answers
35 views
select2 inside ng-repeat not working
I am trying to use select2 inside ng-repeat but its not working . Here is my code.
HTML
<div ng-controller="mycontroller" ng-app="app">
<div ng-repeat="x in y">
<input ...
0
votes
0answers
43 views
How to use ui-select2 events
I am using ui-select2 as shown in the documentation:
<select ui-select2="{ allowClear: true}" ng-model="select2">
<option value="one">First</option>
<option ...
0
votes
0answers
27 views
UI-Select2 shows id in tag
Here is the example
It should show text instead of id. However, it shows id now.
When I look into the code, I found this line
var convertToSelect2Model = function(angular_data) {
var ...
0
votes
4answers
64 views
Angular Select Options with image
I want select drop down option with respective images ,can anyone help me in this ,
here is my code
<select class="form-control demo-htmlselect"
ng-model="spList"
...
0
votes
0answers
41 views
Pass plain value to model Select2 angular-ui
I use select2 from angular-ui, everything works ok, but it passes to ng-model object and I need to get plain value
this is in controller
$scope.units = {
...
0
votes
0answers
26 views
How to manually add a datasource to Angularjs-select2 when select2 is set up as <input/> to load remote data?
I am using the Select2 as a typeahead control. The code below works very well when the user types in the search term.
However, when loading data into the page, I need to be able to manually set the ...
0
votes
1answer
86 views
Are there any applicable options to Angular ui-select2 directive?
Given the following Angular selec2 controller:
<select ui-select2 id="projectListSelection" data-placeholder="Select a Project ..." ng-model="selectedProject">
...
0
votes
0answers
26 views
Fieldset disabled no longer disables Select2
I have a fieldset with a lot of inputs under it.
Now when I disable a fieldset, all inputs get disbaled except for "select2" inputs.
I did some google and noticed this is a known issue and I'm ...
0
votes
0answers
68 views
AngulrJS Select2 Multiple: How to assign user values to select2 multiple selection?
Following code works only for user data having single value stored but doesn't show any value if stored multiple selected values.
<select ui-select2 multiple ng-model="configRow.Value" ...
0
votes
0answers
53 views
AngularJS Select2 value can not assign at first row of grid
I'm using select2 tool in my project using angularjs.
While assigning value to this select2 in a grid using angularjs in first row,
it is not assigning, but if I'm trying to assign in next to first ...
0
votes
1answer
224 views
ui-select2 and ng-required
I'm having problems using require/ng-require with the ui-select2 component. I wrapped the ui-select2 in a custom directive for reasons of reusability, but can't get the required to work with it.
This ...
0
votes
1answer
70 views
AngularJs: select binding and http request
I'm a beginner with angular js and I have a problem with http request and binding select.
I have a select menu in a form which is filled like this:
$http.get("test").success(function (result) {
...
2
votes
1answer
290 views
angular-ui-select2 nested ng-repeat not working
I'd like to display a structure like
parent
-child1
--childOfChild1
-child2
inside select options using angular.
Using lists or other elements works great but when using select2 the result is each ...
0
votes
1answer
84 views
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 - ...
0
votes
1answer
267 views
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 ...
0
votes
1answer
142 views
Updating Select2 selected elements when Angular model changes
I'm working on a project for deploying software through an AngularJS UI. On the current view, you have to select what environment a deployment is for. The possible list of environments is stored in ...
0
votes
3answers
114 views
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 ...
1
vote
2answers
198 views
How to access Angular scope in Select2 “change” handler?
I would really like to know how to set the right property for the right object.
Currently in the "change" event handler I have no knowledge of the scope I'm in. Effectively I don't know which ...
1
vote
1answer
1k views
angular-ui-select2 and breezejs: load ajax list after typing in 2 characters
I have a project where I'm using BreezeJS to fetch data from my webserver. I'm using AngularJS with the ui-select2 module. Currently, I have it where when I load my page, breezejs makes a call to ...
0
votes
1answer
311 views
select2 container smaller than dropdown
I've implemented angular-ui select2 into my application and it's working fine but the rendering of the select box container (above search) is smaller than the dropdown panel.
Here's what I mean:
...
4
votes
2answers
2k views
Trying to use angular ui-select2 in tag mode (not simple tag), losing objects
I've recently upgraded from angular 1.1.4 up to 1.2.9, and grabbed the latest ui-select2 directive and the latest select2 component. My select2s in tag mode have stopped working. The options list and ...
0
votes
1answer
51 views
How I can order the list elements
I'm creating a dropdown through the use of ui-select2=" " how i can sort the list items in to the result
Html:
<input style="width:100%" type="text" ui-select2="selectuiOptions"
...
0
votes
0answers
73 views
Don't know how to remove the console errors in angular ui select2
I created a plunkr (http://plnkr.co/edit/71ZlPcqsfRON5wjMM1He?p=preview) to see how to work with angular ui select2
I successfully made it work , but then I am getting two errors
1) ngModel is ...
1
vote
0answers
992 views
angularjs + ui-select2 module does not trigger initSelection correctly
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 ...
1
vote
0answers
178 views
Angular UI select2 - shows [object Object] on tab switch
select2 with Angular seems to be working - however I'm using ui-router and I have different tabs.
One of my select2 inputs is used in two tabs and the ng-model is the same. While everything works, ...
1
vote
2answers
1k views
Angular directive doesn't fire change event in ngModel
I created a directive for input elements which creates a custom select2 dropdown.
After selecting an element, the original input field (which is used to filter data via the ngModel) is filled with the ...
0
votes
1answer
348 views
Placeholder is not working in angularjs select2
Here is the code which i was tried. i tried to add placeholder with angularjs code and html code but it is not working in both the case. please help me or suggest me how to do in this case
...
0
votes
1answer
255 views
In select2 on keyboard down arrow key is pressed then I have to avoid server call
In select2 on keyboard down arrow key is pressed then I have to avoid server call because server call again refreshes list and my down arrow key functionality doesn't work , but don't no how to? I ...
0
votes
2answers
582 views
AngularJS select tag not populating with object data when in ng-repeat
I have an issue with angularjs's select directive.
Here is my code:
<ul class="thumbnails">
<li class="span4" ng-repeat="product in productsDTO">
<div ...
4
votes
2answers
803 views
Issue with pre-populating angular-ui's select2
I have an issue with angular-ui/select2 control.
I would like to use angularjs to pre-populate the control with an array of objects. I use the init function in order to try and achieve this but ...
2
votes
1answer
947 views
select2 dropdown selected value doesn't get updated with the updated model
I use the latest select2 api (select2-3.4.5) and my html for select 2 looks like this.
<select ui-select2 id="select2-test" ng-model="mymodel.myTitle">
<option ...
0
votes
1answer
348 views
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 ...
0
votes
1answer
555 views
Angularjs, select2 with dynamic tags and onclick
I use angularjs with "ui_select2" directive. Select2 draws new tags with formatting function, there are "" elements with "ng-click" attribute. How to tell angularjs about new DOM elements? Otherwise ...
0
votes
0answers
123 views
select2 disables a textbox binded to the same model
<select ui-select2="" data-ng-model="popupModel.processor">
<option value="">-- chose a processor --</option>
<option ng-repeat="p in ...
1
vote
1answer
2k views
Angular ui-select2 with AJAX multiselect - retrieve final selection values as ids instead of json
Angular ui-select2 with AJAX multiselect - retrieve final selection values as ids instead of json
Problem statement
I want to use a tokeninput/chosen/select2 style of ui control to edit an array of ...
-1
votes
1answer
803 views
angular-ui select2 can not have multiple input with select2Options in same controller
I am using select2 from https://github.com/angular-ui/ui-select2
// I have two input select2 box inside one controller
<form ng-controller="MyCtrl">
<input
type="text"
...
2
votes
1answer
2k views
Updating select2 via angular controller?
I'm attempting to use Angular's $http directive to pull a list of tags from a server, and use that to populate a select2 select. My code looks like this:
var samplePage = ...
1
vote
0answers
207 views
Multiple entry select2 and angular model fetched by $resource
I am having some difficulty figuring out how to make it all work together. Here is what I would like to do:
The model is fetched using $resource from the rest API:
var itemResource = ...
1
vote
1answer
639 views
Using <select> with nested objects in Angular
I'd like to create an html output like this:
<select>
<option value="" class="">-- Choose category --</option>
<optgroup label="Dogs">
<option ...
1
vote
2answers
2k views
Angular select within a ng-repeat directive: how can I access the children scopes?
I've got an ng-repeat-ed table row, inside wich are a pair of angular selects:
<div ng-controller="midiCtrl" id="midi-ctrl">
[...]
<tr ng-repeat="plugin in ...