Reputation: 349
<script src="~/angular/runtime*"></script>
<script src="~/angular/polyfills*"></script>
<script src="~/angular/vendor*"></script>
<script src="~/angular/main*"></script>
I want to add these scripts in my Layout page
Upvotes: 7
Views: 376
Reputation: 23937
As far as I can tell, the hashes in your js file names are caused by the --prod
flag in the angular-cli.
You basically have to options here:
--prod
flag--output-hashing none
flagThat means you would end up with a build command similar to this:
ng build --prod --output-hashing none
Please note, that the hashes serve a specific purpose: Cache-Busting. Everytime you generate a new build, these hashes change and if you inject the script(s) automatically into a html file using the angular-cli, this has the benefit of not needing to check if you have to clear your cache and if the changes have been picked up by your browser or if they have been served from disk.
Documentation: https://angular.io/cli/build
Upvotes: 6