How to handle hashed assets with sprite.svg in Angular 10

纵然是瞬间 提交于 2021-02-10 18:19:20

问题


Recently, we updated our Angular application from version 8 to version 10, where we add fixes to assets folder for having relative path and it work perfectly fine for all images except sprite icons.

We having svg-fragment-identifiers, where hash code is used as identifiers for specific to SVG icon from SPRITE file.

In Angular 8 - background: url(sprite.60bf8dc8eb06ec7972fe.svg#search) no-repeat
In Angular 10 - background: url(sprite.60bf8dc8eb06ec7972fe.svg) no-repeat

Problem - After hash part is missed in Angular 10, which creating issue for not showing any icon image from sprite

来源:https://stackoverflow.com/questions/65283942/how-to-handle-hashed-assets-with-sprite-svg-in-angular-10

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