forked from angular/angular-cli
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This was added back in angular#3401 but never documented. Also cleans up duplicate docs in overview. Close angular#4693
- Loading branch information
1 parent
b000445
commit cec9b68
Showing
3 changed files
with
42 additions
and
65 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Global styles | ||
|
||
You can add Javascript files to the global scope via the `apps[0].scripts` | ||
property in `angular-cli.json`. | ||
These will be loaded exactly as if you had added them in a `<script>` tag inside `index.html`. | ||
|
||
This is especially useful for legacy libraries or analytic snippets. | ||
|
||
```json | ||
"scripts": [ | ||
"global-script.js", | ||
], | ||
``` | ||
|
||
You can also rename the output and lazy load it by using the object format: | ||
|
||
```json | ||
"scripts": [ | ||
"global-script.js", | ||
{ "input": "lazy-script.js", "lazy": true }, | ||
{ "input": "pre-rename-script.js", "output": "renamed-script" }, | ||
], | ||
``` |
This file contains 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