问题
I have Angular 2 app generated by Angular CLI tool.
When I change base to any value in index.html:
<base href="test">
and build the app (ng build) the resulted index.html has:
<base href="/">
So my question is: How can I change base in index.html?
Thanks for any help.
回答1:
Use the --base-href
option on ng build
. https://github.com/angular/angular-cli/wiki/build
来源:https://stackoverflow.com/questions/43830060/angular-cli-cant-change-base-in-index-html