ng-zorro-universal-starter
ng-zorro-universal-starter copied to clipboard
图标配置成动态加载时, 在服务器端会提示找不到图标
图标配置成动态加载:
{
"glob": "**/*",
"input": "./node_modules/@ant-design/icons-angular/src/inline-svg/",
"output": "/assets/"
}
在服务器端提示:
ERROR Error: [@ant-design/icons-angular]: the icon user-o does not exist or is not registered.
ERROR Error: [@ant-design/icons-angular]: the icon laptop-o does not exist or is not registered.
ERROR Error: [@ant-design/icons-angular]: the icon notification-o does not exist or is not registered.
在浏览器端正常
非常感谢ng-zorro团队为我们提供这么好的开源框架, 希望越做越好, 再接再厉, 加油...
同样遇到这个问题,希望可以尽快解决,感谢感谢!
@emondora
angular 现在还不支持在 server-builder 配置 assets
选项,不过这并不是什么严重的问题。你只需要
在 app.server.module.ts
中 provide 全量的静态 SVG 即可,对客户端而言只有实际渲染的文档大小,不会影响网络开销。
@emondora angular 现在还不支持在 server-builder 配置
assets
选项,不过这并不是什么严重的问题。你只需要 在app.server.module.ts
中 provide 全量的静态 SVG 即可,对客户端而言只有实际渲染的文档大小,不会影响网络开销。
使用命名空间自定义的图标如何引入呢