You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Angular项目中部分Material图标无法渲染的问题求助

Angular项目中部分Material图标无法渲染的问题求助

我在Angular项目里遇到了个头疼的问题:有几个Material图标死活渲染不出来,比如这两个:

<mat-icon>domino_mask</mat-icon>
<mat-icon>hourglass</mat-icon>

其他图标都能正常显示,就这几个不行。我已经尝试了好几种方法来排查,但问题还是没解决:

  • 清理了node_modules目录,重新运行了npm install
  • 用ng update命令更新了Angular Material
  • 反复确认过模块里已经导入了MatIconModule
  • 检查了index.html文件,确认Material Icons的链接标签已经正确添加:
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

有没有大佬能帮忙分析下可能哪里出问题了?或者还有什么其他排查步骤可以试试?非常感谢!

备注:内容来源于stack exchange,提问作者maxime Lassort

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.16 11:54:30