Angular CLI: Can't change base in index.html

与世无争的帅哥 提交于 2020-01-17 07:54:23

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!