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: d.select2 is not a function #40

Closed
daniel-seitz opened this issue Mar 18, 2016 · 7 comments
Closed

TypeError: d.select2 is not a function #40

daniel-seitz opened this issue Mar 18, 2016 · 7 comments

Comments

@daniel-seitz
Copy link

Hi Ruben, this might be similar to #39.

I followed your instruction and used the current version. It always brings up the same error. Do you have any clue what could cause this?

Versions:
Angular: 1.4.7
rubenv/angular-select2: 1.4.3 and 1.4.2
(with and without select2: 3.5.4, 3.5.2 and 4.0.2)

Basically the code is: angular module: 'rt.select2'
<select2 ng-model="obj.field" s2-options="val.id as val.name for val in values" options="{ allowClear: true }"></select2>

@rubenv
Copy link
Owner

rubenv commented Mar 18, 2016

I'm sorry, but I'll need more info to debug this. Can you make a minimal
jsFiddle example that demonstrates your error?
On 18 Mar 2016 6:58 pm, "didadan" [email protected] wrote:

Hi Ruben, this might be similar to #39
#39.

I followed your instruction and used the current version. It always brings
up the same error. Do you have any clue what could cause this?

Versions:
Angular: 1.4.7
rubenv/angular-select2: 1.4.3 and 1.4.2
(with and without select2: 3.5.4, 3.5.2 and 4.0.2)

Basically the code is: angular module: 'rt.select2'


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#40

@daniel-seitz
Copy link
Author

Hi Ruben, thanks for the quick reply. Here the fiddle: https://jsfiddle.net/didadan/wLb6jc7p/1/

@daniel-seitz
Copy link
Author

Ups, guess it was the wrong link. Had to make it public first: https://jsfiddle.net/didadan/wLb6jc7p/

@rubenv
Copy link
Owner

rubenv commented Mar 18, 2016

There's no jQuery nor select2 loaded in that fiddle, that clearly won't work :-)

@daniel-seitz
Copy link
Author

Ok, I didn't put it because it's not mentioned in the documentation - at least I didn't find it. However I tried with different solutions, here is a fiddle with the libs. How about this? https://jsfiddle.net/didadan/nzw6ybmt/

@rubenv
Copy link
Owner

rubenv commented Mar 24, 2016

Try loading jQuery before loading Angular, when combining those you always need to load jQuery first.

@daniel-seitz
Copy link
Author

Thank you Ruben, that solves the issue.

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

2 participants