-
Notifications
You must be signed in to change notification settings - Fork 11.8k
update wiki Bootstrap story #5239 #5248
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
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
|
|
||
| # Include [Bootstrap](http://getbootstrap.com/) | ||
|
|
||
| [Bootstrap](http://getbootstrap.com/) is a popular CSS framework which can be used within an Angular project. | ||
| [Bootstrap](https://getbootstrap.com/) is a popular CSS framework which can be used within an Angular project. | ||
| This guide will walk you through adding bootstrap to your Angular CLI project and configuring it to use bootstrap. | ||
|
|
||
| ## Using CSS | ||
|
|
@@ -45,9 +45,41 @@ Now that the project is set up it must be configured to include the bootstrap CS | |
| "styles.css" | ||
| ], | ||
| ``` | ||
|
|
||
| ### Adding full Bootstrap component JS support | ||
|
|
||
| ```json | ||
|
|
||
| // version 4 | ||
|
|
||
| **Note:** from Bootstrap site | ||
|
|
||
| Some plugins and CSS components depend on other plugins. If you include plugins individually, | ||
| make sure to check for these dependencies in the docs. Also note that all plugins depend on | ||
| jQuery (this means jQuery must be included before the plugin files). | ||
| Consult our bower.json to see which versions of jQuery are supported. | ||
| https://v4-alpha.getbootstrap.com/getting-started/javascript/ | ||
|
|
||
| In `.angular-cli.json` add the following lines to the scripts section: | ||
|
|
||
| # version 4.x | ||
| "scripts": [ | ||
| "../node_modules/jquery/dist/jquery.js", | ||
| "../node_modules/tether/dist/js/tether.js", | ||
| "../node_modules/bootstrap/dist/js/bootstrap.js", | ||
| ] | ||
| ``` | ||
| **Note:** When you make changes to `.angular-cli.json` you will need to re-start `ng serve` to pick up configuration changes. | ||
|
|
||
| ### Other Bootstrap component libraries | ||
|
|
||
| - ng bootstrap https://ng-bootstrap.github.io (version 4.x only) | ||
| - ng2 bootstrap http://valor-software.com/ng2-bootstrap/ (version 3.x & 4.x) | ||
|
|
||
| You should check with the libraries for instructions how to include their project with Angular-cli. You probably only need to | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you're not going to provide specific instructions for each of these solutions, please remove this line and leave just the links. |
||
| include the above CSS instructions, the JS/TS part will be provided by the library themself. | ||
|
|
||
|
|
||
| ### Testing Project | ||
|
|
||
| Open `app.component.html` and add the following markup: | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the spacing consistent (this is a minor nit-pick, but I've also requested other changes 😀)