mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-21 22:34:21 +08:00
This was added back in #3401 but never documented. Also cleans up duplicate docs in overview. Close #4693
581 B
581 B
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.
"scripts": [
"global-script.js",
],
You can also rename the output and lazy load it by using the object format:
"scripts": [
"global-script.js",
{ "input": "lazy-script.js", "lazy": true },
{ "input": "pre-rename-script.js", "output": "renamed-script" },
],