-
Notifications
You must be signed in to change notification settings - Fork 248
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
element.chosen is not a function #123
Comments
Did you make sure chosen itself is included on your page? (not just the angular piece) |
Yeah of course, i installed with bower and i added to my html |
Got same error in same context. Also, chosen is indeed loaded, as typing |
Welp, I fixed it on my side. Just import jquery BEFORE angular. |
Im can only trying until this monday xd, thanks i dont try to play with the imports. |
Switching the order fixed it for me. jQuery and chosen must be loaded before Angular. |
Not working for me :S |
@estvmachine did my suggestion fix your issue ? |
Yes, i'm getting element.chosen is not a function. I have a controller with a variable called "$scope.clientes" , that variable get its data from a service, it may be that the directive is applied before the variable has data and is not updated when data is avaialble. Is that possible? |
Haven't had any issue with chosen and empty arrays. And it surely wouldn't return this kind of error. |
@th3m4ri0 yes, im ok with this solution, you can close this issue. |
I am not owner of the repo, only you and an owner can close the issue |
Thanks !!! ( Just import jquery BEFORE angular) |
Thanks !!! ( Just import jquery BEFORE angular) - I think should be mentioned in the Plugin Page |
Hi @alilishan-omniphics, it's on the docs, but seems nobody reads it, I might strip all content from the readme, so users will click at the docs link. PS: That's an Angular thing. You must use jquery before angular anytime. |
@leocaseiro haha thanks dude apologies for the error. could be i missed it cos i was linked to the discussion from https://github.com/mishguruorg/angular-timezone-selector |
@leocaseiro I'm loading jquery and angular before angular-chosen, still getting the error element.chosen is not a function. Am I doing something wrong here? |
Hi @njcoutinho, It seems you need to include also the chosen library. Please, read the documentation how to get started: PS: I appreciate if you open a separated issue for your case. |
@leocaseiro Just figured out I haven't loaded the chosen.jquery.min.js, My mistake |
Sorry to bring issue again but I can't seem to get it to work. And when I get to this point of |
@ruisilva450 what module bundler do you use? Be mindful that it's possible to end up including multiple versions of jquery lib with webpack in some situations. If you're on yarn, check your If you have multiple jQuery instances, then some of them might have a plugin applied and some not. It's a confusing and complicated problem to debug, and we might do something to address it in #247 |
My implementation:
The controller...
The view...
But i got this error
The text was updated successfully, but these errors were encountered: