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

Selectpicker doesn't work with Angularjs #58

Closed
alanloffler opened this issue Feb 19, 2013 · 7 comments
Closed

Selectpicker doesn't work with Angularjs #58

alanloffler opened this issue Feb 19, 2013 · 7 comments

Comments

@alanloffler
Copy link

I'm trying to use the selectpicker with angularjs, but doesn't show properly the use of brackets in the value parameter and the option text.

Did someone else tried to use the selectpicker in angularjs with bootstrap?

@alanloffler
Copy link
Author

It works calling the jquery function inside the controller, which has the options data.

@elyobo
Copy link

elyobo commented Oct 20, 2013

I'm also having issues with selectpicker and angularjs, but my problem is that the ng-model binding doesn't work if I use selectpicker, but works perfectly without it. Any ideas?

@xavadu
Copy link

xavadu commented Nov 13, 2013

Same that you @elyobo

@larissaleite
Copy link

@onza I tried calling the $('.selectpicker').selectpicker(); inside the controller that has the options data, but it didn't work. Could you please provide an example of how you managed to make it work?

@rajmohanpdy
Copy link

i have been facing this problem. selectpicker not working with ng-modal. Any soluttion ?

@caseyjhol
Copy link
Member

@rosorio02
Copy link

Hi there!
I know the post was made long time ago but I hope my solution will be a help for others.

I got another solution to the issue related.

What I did was first load my data from back-end using angularjs and inside the .success after my validation I wrote the following code:
angular.element(document).ready(function () { $('select').selectpicker("destroy"); $('select').selectpicker("render"); });
I tried to do it without angular.element(document).ready(function (){}) but nothing happend. I suppose the plugin's methods only works inside that function.

Happy Coding!!

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

7 participants