Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

图标配置成动态加载时, 在服务器端会提示找不到图标 #4

Open
xujz520 opened this issue Aug 27, 2019 · 4 comments
Open
Assignees

Comments

@xujz520
Copy link

xujz520 commented Aug 27, 2019

图标配置成动态加载:

{
    "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.

在浏览器端正常

@xujz520
Copy link
Author

xujz520 commented Aug 27, 2019

非常感谢ng-zorro团队为我们提供这么好的开源框架, 希望越做越好, 再接再厉, 加油...

@hsuanxyz hsuanxyz self-assigned this Aug 27, 2019
@emondora
Copy link

同样遇到这个问题,希望可以尽快解决,感谢感谢!

@hsuanxyz
Copy link
Member

hsuanxyz commented Sep 23, 2019

@emondora
angular 现在还不支持在 server-builder 配置 assets 选项,不过这并不是什么严重的问题。你只需要
app.server.module.ts 中 provide 全量的静态 SVG 即可,对客户端而言只有实际渲染的文档大小,不会影响网络开销。

@C-racker
Copy link

C-racker commented Apr 2, 2022

@emondora angular 现在还不支持在 server-builder 配置 assets 选项,不过这并不是什么严重的问题。你只需要 在 app.server.module.ts 中 provide 全量的静态 SVG 即可,对客户端而言只有实际渲染的文档大小,不会影响网络开销。

使用命名空间自定义的图标如何引入呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants