-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
All guides deprecated: how to simply load bootstrap 3 and jquery in 5.1.1 #1303
Comments
Toward the top of To import CSS: To import JS: After #1304 is merged you will be able to directly import Bootstrap SASS files, customize the variables, and Webpack will automatically generate an external CSS file for your production build. Right now it all gets inlined in the Javascript which slows loading time for a big library like Bootstrap. |
I would recommend to extract all critical css to a css file outside of the module. It will allow to use it for anything that is also necessary for loading screens etc. I usually extract everything to a |
I got bootstrap styles to work, but the glyphicons just wont show (I see a square). |
same question for recent v5.2.0 Release. Is there any current, v5.2.0 compatible guide to easily integrate jquery+bootstrap (3.3.7 or 4) into this Seed? |
@basst314 |
using ng2-bootstrap as described in |
@colinskow so we juste have to install bootstrap and jquery and the js files for both will automatically be included? As stated by @blackholegalaxy Angular-CLI provide simple styles and script part in angular-cli.json which is somehow translated in webpack instruction. I'm quite surprised angular class started doesn't provide such a simple way to include external css and js. The same question as bootstrap and jquery could apply to bootstrap-select module for example or font-awesome. |
We do support external stylesheets. Follow these instructions: To import JQuery and Bootstrap JS follow the instructions here (but just JavaScript instructions, ignore stylesheets.) Most people tend to use Angular 2 specific Bootstrap plugins instead of the official JS, which is why we don't support it out of the box. Many of the Wiki guides are out-dated and need to be updated! |
Ok thanks for resources. But if we need any other JS file it could be convenient to be able to import it in the js bundled produced by webpack. For example, how can I include bootstrap-fileinput JS or any JS bootstrap/jquery plugin? Angular-CLI achieved to simpli list the file in the proper section of their conf file. I found it simple. But I don't want to use angular-cli packages. Just pointing out their method is simpler and allow easy include of any JS file in the bundle. |
If the JS library doesn't export a global to |
Just cloned the starter and i'm stuggling to get bootstrap 3 (css and js) and jquery running. I'm not interested in sass stuff: just simple bootstrap and jquery.
Previously on our project we used Angular-CLI and importing bootstrap and in the angular-cli.json we simply had to add (after a
proper npm install bootstrap jquery --save
):But here, with "raw" webpack, i'm lost. All the guides, previous issues and so on seems outdated as they use a vendor.ts which seems not to exist anymore.
Is there any way to import easily bootstrap and jquery working with the current Starter version?
The text was updated successfully, but these errors were encountered: