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

Avoid including jQuery #547

Closed
pasine opened this issue Sep 11, 2014 · 7 comments · Fixed by #548
Closed

Avoid including jQuery #547

pasine opened this issue Sep 11, 2014 · 7 comments · Fixed by #548

Comments

@pasine
Copy link
Contributor

pasine commented Sep 11, 2014

I have noticed that running the generator without including Bootstrap causes bower to still loading jQuery: why this? Is it still necessary for something that I am missing?

Another thing: what do you think about switching from angular-ui to angular-strap for handling Boostrap directives? It looks more angular-like and doesn't require jQuery.

@kingcody
Copy link
Member

Just for the record, angular-bootstrap does not require jQuery either.

@kingcody
Copy link
Member

Also, I do believe that bootstrap/bootstrap-sass-official are the only packages that depend on jquery

@pasine
Copy link
Contributor Author

pasine commented Sep 11, 2014

That's true, but I think the dependency should not be included into the main bower.json.

@kingcody
Copy link
Member

I pretty much agree with you @pasine, my only reserve is that angular will use jQuery instead of it's built-in jQuery-lite if jQuery is loaded into the window before angular loads. I'm wondering if switching to strictly jQuery-lite included with angular would cause any problems for users accustomed to full jQuery support with angular.element. What are your thoughts?

@pasine
Copy link
Contributor Author

pasine commented Sep 11, 2014

I understand, but this should be a generator, a starting point for all users, so IMHO it should be as lean as possible in terms of external resources.
If people really need jQuery, they can simply add it manually using bower as any other library.

@kingcody
Copy link
Member

I completely understand.

Care to make a PR? If you do, I'd dare say you could remove jQuery altogether and let the bootstrap dependency bring it in when needed.

@kingcody
Copy link
Member

Another potential good point to add to this is:
Using angular.element is strongly preferred over accessing jQuery directly, so code written by convention will not likely be affected by this change.

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

Successfully merging a pull request may close this issue.

3 participants