Skip to content

Updated global lib story to reflect latest changes required by bootst… #7585

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
wants to merge 5 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions docs/documentation/stories/global-lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,32 @@ Some javascript libraries need to be added to the global scope, and loaded as if
they were in a script tag. We can do this using the `apps[0].scripts` and
`apps[0].styles` properties of `.angular-cli.json`.

As an example, to use [Bootstrap 4](http://v4-alpha.getbootstrap.com/) this is
As an example, to use [Bootstrap 4](https://getbootstrap.com/docs/4.0/getting-started/introduction/) (beta) this is
what you need to do:

First install Bootstrap from `npm`:

```bash
npm install bootstrap@next
npm install jquery --save
npm install bootstrap@next --save
npm install popper.js --save
```

Then add the needed script files to `apps[0].scripts`:

```json
"scripts": [
"../node_modules/jquery/dist/jquery.js",
"../node_modules/tether/dist/js/tether.js",
"../node_modules/bootstrap/dist/js/bootstrap.js"
"../node_modules/jquery/dist/jquery.slim.js",
"../node_modules/popper.js/dist/umd/popper.js",
Copy link
Member

@clydin clydin Sep 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation seems off. I'd suggest keeping the original two spaces.

"../node_modules/bootstrap/dist/js/bootstrap.js"
],
```

Finally add the Bootstrap CSS to the `apps[0].styles` array:
```json
"styles": [
"../node_modules/bootstrap/dist/css/bootstrap.css",
"styles.css"
"../node_modules/bootstrap/dist/css/bootstrap.css",
"styles.css"
],
```

Expand Down