首页 > 解决方案 > Mat-icon 不显示图标

问题描述

我喜欢棱角材料的设计,但使用它可能会很痛苦。该站点显示了一个使用示例

<mat-icon>home</mat-icon>

然而,当我在我的项目中做同样的事情时,我只看到文本“home”。

除了导入 MatIconModule 之外,我看不到在哪里需要做任何事情。

有人有线索吗?

我正在使用角度材料 v8.0.1。我还安装了 material-design-icons v 3.0.1。并在我的 index.html 中有这个。(我一次做了一个)

<link rel="stylesheet" href="https://storage.googleapis.com/non-spec-apps/mio-icons/latest/outline.css">

标签: angularangular-materialicons

解决方案


你需要删除

<link rel="stylesheet" href="https://storage.googleapis.com/non-spec-apps/mio-icons/latest/outline.css">

并更改为

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

推荐阅读