angular - 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">
解决方案
你需要删除
<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">
推荐阅读
- python - 如何在此代码中添加背景而不会出错?
- spring-boot - Spring Boot - Netty 返回 502 状态
- java - Gradle 多项目构建:未找到插件
- mysql - 检查用户是否存在于数据库中以获取 ID 以外的参数
- javascript - 如何显示变量更改
- javascript - 如何更改三角形每一侧的图像(任何纹理)?
- c++ - 如何有效地计算每个多边形区域内的所有非零像素?
- go - 当显然不是时,切片超出范围
- reactjs - 字体在每页的每次刷新时执行 FOUT(无样式文本的 Flash)
- spring - 使用 Spring R2DBC 存储库时,我可以提供自己的自定义 R2dbcEntityTemplate 吗?