[英]Angular project with 2 base-href configurations
Angular CLI:7.2.3節點:10.14.1 OS:darwin x64 Angular:7.2.2
我當前的index.html已將基本href設置為<base href="/" />
,我的應用程序運行在http://localhost:port/
是否有可能讓我的應用程序在本地和生產版本的http://localhost:port/
和http://localhost:port/something/
都運行,無需在構建時設置--base-href標志或ng serve
?
您可以使用
ng build --prod --base-href any value
i.e ng build --prod --base-href ./
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.