Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: element.select2 is not a function #39

Open
khirthane opened this issue Mar 4, 2016 · 6 comments
Open

TypeError: element.select2 is not a function #39

khirthane opened this issue Mar 4, 2016 · 6 comments

Comments

@khirthane
Copy link

Select2 for angular with below versions
Select2 : https://github.com/rubenv/angular-select2
Angular : v1.4.9

Iam getting the below error

TypeError: element.select2 is not a function
at link.getOptions (app.js:31163)
at getSelection (app.js:31231)
at link.controller.$render (app.js:31250)
at Object.ngModelWatch (app.js:25987)
at Scope.$digest (app.js:16229)
at Scope.$apply (app.js:16501)
at bootstrapApply (app.js:1822)
Here's the fiddle:

http://jsfiddle.net/r23mjL01/1/

@Kesidi
Copy link

Kesidi commented Mar 16, 2016

Are there any updates with this problem?

@rubenv
Copy link
Owner

rubenv commented Mar 16, 2016

Did you load the select2 library?

@Kesidi
Copy link

Kesidi commented Mar 16, 2016

I have got this error after load select2 library
"The select2('data') method was called on an element that is not using Select2".
angular version 1.3.15, Select2 version 4.0.2
here is example how I use it
%select2(ng-model="country" s2-options="country.id as country.name for country in countries" multiple)

@rubenv
Copy link
Owner

rubenv commented Mar 16, 2016

Select2 4.x isn't supported yet, see #18.

You need a 3.5.x version.

@Kesidi
Copy link

Kesidi commented Mar 16, 2016

thx

@FernandoAguilarR
Copy link

where can I download version 3.5?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants