小编Sun*_* K.的帖子

ng build --prod --base-href

ng build --prod --base-href/gi-new --deploy-url/gi-new

我将angular 5 app部署到窗口机器上的共享IIS服务器上

我已将我的dist文件夹的内容上传到' http://192.168.10.181/gi-new '

我的应用程序运行,但资产中的图标没有选择正确的路径,因此它们不会显示在网页上.

他们使用的是http://192.168.10.181/assets而不是/ gi-new/assets

angular-cli.json中的条目

"assets":[{"glob":"*.svg","input":"../ node_modules/material-design-icons/sprites/svg-sprite/","output":"assets/svg-icons "}]

AppComponent中的条目

构造函数(iconRegistry:MatIconRegistry,sanitizer:DomSanitizer){iconRegistry.addSvgIconSetInNamespace("action",sanitizer.bypassSecurityTrustResourceUrl("assets/svg-icons/svg-sprite-action.svg"));

我该如何克服这个问题?

deployment assets build angular

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

angular ×1

assets ×1

build ×1

deployment ×1