Tagged Questions
0
votes
0answers
117 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 ...
2
votes
1answer
131 views
Angular UI-Select Dropdown Value Issue After Angular 1.2 Upgrade
We just upgraded Angular from 1.2 RC 2 to 1.2 final and upgraded select2.js from 3.4.0 to 3.4.3.1. Now I'm noticing some dropdowns not displaying their values correctly.
The dropdown value is ...
0
votes
1answer
149 views
How to populate jQuery UI Select2 with Restangular
I can't see why Restangular would behave differently inside a jquery-ui callback to the way it does anywhere else. Can you?
The following works in my controller:
...
1
vote
0answers
76 views
angular using ui-select2 to assign an object as a model property
Hypothetical example to illustrate a problem I am having using angular-UI select2. Let's say I have a screen where I want to edit a "game" model. A game, among other things has players. I want to ...
1
vote
1answer
674 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 = ...
0
votes
2answers
722 views
Angular-UI select2 dynamically change tags attribute in options
Official example for Angular-ui select2 tags is:
myAppModule.controller('MyController', function($scope) {
$scope.list_of_string = ['tag1', 'tag2']
$scope.select2Options = {
...
0
votes
1answer
2k views
Angular UI Select2, why does ng-model get set as JSON string?
I'm using angular-ui's select2 for a fairly simple dropdown. It's backed by a static array of data sitting on my controller's scope. In my controller I have a function that gets called on ng-change ...
0
votes
1answer
2k views
How can I pass option changes to Angular-UI ui-select2?
angular-ui's ui-select2 documentation shows that you can do something like the following:
myAppModule.controller('MyController', function($scope) {
$scope.select2Options = {
...
2
votes
1answer
702 views
angular & ui-select2: showing preselected value doesn't work
When using the ui-select2 (https://github.com/angular-ui/ui-select2), the preselected option is not shown properly.
I created a plunkr: http://plnkr.co/edit/Ek86jUciPo7rgBnbKdFc
When the page is ...
0
votes
0answers
15 views
why is the angular-ui directive different from the the proloser version?
I can't get the angular ui version to work, but the gist by proloser works just fine, even after I update all the libraries to the latest stable versions.
From what I can see, proloser contributes to ...
2
votes
1answer
473 views
Select2 AngularJS - How do i dynamically add a tag item?
I have a select2 input box the defined like this:
<input id="searchbox" ui-select2="autoCompleteSearch" ng-model="searchedLeafs" style="width:80%;height:36px;" class="searchbox"/>
Basically, ...
5
votes
3answers
4k views
How to get Select2 tags initializing correctly with Angular UI when option groups are used?
I have been trying to get my angular ui select2 directive to initialize and have been unable to get it to work with option groups.
The Code:
function testCtrl1($scope)
{
$scope.selectedOptions ...
3
votes
2answers
2k views
angular-ui select2 initSelection not getting called
I have an angular-ui select2 component on my page. It works fine when the user types something in (it uses ajax to load in the data).
But the initSelection function never gets called. Here's the ...
3
votes
0answers
1k views
Angular UI select2 directive - updating the model programmatically not reflected on the widget
I'm trying to update select2 model programmatically and for the view to refresh but it doesn't seem to work.
Here's a sample plunker forked from the Angular UI project: ...
1
vote
1answer
633 views
angular-ui select2 tagging update the data value
So this is my select2 input
<input type="hidden" ng-model="ProjectTagpr" class="input-large" ui-select2="tagOptions" />
where in tagOptions is
{
data: ...
0
votes
2answers
2k views
angular-ui select2 tagging - preselected tags id/text
This is my tags input
<input type="hidden" ng-model="tags" class="input-large" ui-select2="{ tags: [{ id:5, text: 'tag1' }, { id: 8, text: 'tag2' }] }" />
now how do I make, say tag with id ...
4
votes
1answer
1k views
Can't select item in list created by ui-select2
In my HTML I have this line:
<input ng-change="privChanged()" ng-model="selectedPriv" ui-select2="privsSelect2options"></input>
and the privsSelect2options function:
...
0
votes
3answers
1k views
Angular UI select2 with tags not working inside custom directive
Using the Angular UI Select2 directive, with tags defined on an input field. If the input is itself inside a custom directive, then it is not initialised correctly and the console gives an error:
...
0
votes
1answer
427 views
Manipulating list values in select2 using ui-select2 directive in AngularUI
I'm trying to set the value of select2 from iside the controller. The problem is that when I use ng-options, changes in model value are not reflected in the select2 list.
html:
<div ...
1
vote
1answer
1k views
AngularUI select2 onChange method
How do I go about doing something along these lines:
<select ui-select2 multiple="true" on-change="onChange()" data-ng-model="select2Model"></select>
where in my controller, I have ...
2
votes
1answer
2k views
AngularJS ui-select2 placeholder not showing inside nested ng-repeat
whew, ok. scoping nightmares.
My placeholders in my inputs are not showing, they work as standalone inputs - but as soon as they are added to a list they lose scope. I have identified the issue - ...
13
votes
1answer
5k views
Setting initial values of Angular-UI Select2 multiple directive
I have a select2 directive for a multiple select of countries with a custom query to grab the data:
// Directive
<input ng-model="filters.countries" ui-select2="filters.countryOptions"
...
2
votes
1answer
822 views
Angular UI select2 - How to stop automatic sorting?
The following data is attached to select2 via Angular UI: (Live example here)
JS:
$scope.items = [
{id: 1, text: 'elephant'},
{id: 2, text: 'desk'},
{id: 3, text: 'car'},
{id: 4, text: ...
1
vote
2answers
395 views
Angular UI Select2 dumping error in console while using in chrome App
I'm trying to use the following select2 example in chrome App using AngularJS and Angular-UI. It's working fine but unfortunately I'm getting the following error in chrome console every time clicking ...
2
votes
2answers
340 views
Select2 isn't working fine on a chrome extension popup
I'm experiencing a bad behavior of Select2 on a chrome extension using AngularJS and Angular-UI.
The scenario
Select2's content is loaded asynchronously via AngularJs $resouces module.
What ...
1
vote
2answers
3k views
Angular UI select2 array with objects is it possible?
Is there a easy way to have options as objects in array? Like following:
$scope.search.categories = [{id: '1',name: 'first'},{id: '2',name: 'last'}];
<select ui-select2 ...
2
votes
2answers
2k views
Angular UI / select2 multiple how to preselect values/options?
using angular-ui with select2 as follows:
<select ui-select2 ng-model="search.categories" multiple style="width:300px" data-placeholder="select category">
<option value="open" ...
3
votes
1answer
2k views
Angular-ui select2 not working when mixing angular with twitter-bootstrap
I'm using angular-ui and bootstrap in the same web application and I've an issue when trying to use the ui-select2 component: everything works fine except that upon selecting an element in the ...
0
votes
2answers
790 views
AngularUI select2 AJAX set via model
I'm using AngularUI's ui-select2 directive with AJAX.
Here's what I've got in my view:
<label>Group: <input ng-model="group" ui-select2="select2GroupConfig"></label>
Here's what ...
4
votes
1answer
1k views
angularUI ui-select2 directive not working
I've been banging my head against the wall with this, so I've reduced it to the bare minimum:
index.html:
<html lang="en" ng-app="myApp">
<body ng-controller="main">
...
0
votes
1answer
941 views
Angular UI Select2 in the Bootstrap Navigation Bar
Select2 of the Angular-UI in Bootstrap navigation bar is giving error
TypeError: Object [[object HTMLInputElement]] has no method 'is'
Please refer to the http://plnkr.co/edit/yCG5M9
3
votes
1answer
2k views
Two way Databinding with Angular-UI Select2 with Ajax functionality
Two way Databinding with AngularJS + Angular-UI Select2 with Ajax functionality.
I created a directive to implement Select2 dropdown Ajax behavior in Generic way:- (It requires few attributes to get ...