angular - Some material icon doesn't show in production
问题描述
I don't know why but only in production some material icon doesn't appear, as you can see from the image the first icon is missing:
here's the code:
<mat-nav-list>
<a mat-list-item routerLink="/dashboard" matTooltip="dashboard">
<mat-icon matListIcon>bar_chart</mat-icon>
</a>
<a mat-list-item (click)="routeToContacts()" matTooltip="contacts">
<mat-icon matListIcon>people</mat-icon>
</a>
解决方案
You need to insert style into the project:
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
If it did not solve the problem, please try to add the code below in your style.css (or style.scss) :
md-icon{
font-family: 'Material Icons' !important;
}
推荐阅读
- c - 使用 c 应用程序清除 COM 设备中的 STALL 条件
- python-3.x - webbrowser.get('safari').open(url) 如果未打开 safari,则首先在默认浏览器中打开 URL?
- javascript - 当浏览器窗口最小化时,GWT scheduleFixedDelay 方法不起作用
- javascript - 单击按钮时删除/隐藏多个 div
- php - 我想查看product_name。错误是 - 此集合实例上不存在属性 [product_name]。(abc.blade.php)
- vue.js - 如何向 vuepress 博客添加语法高亮?
- java - Bukkit:getInstance 为空
- python - 多个客户的IP地址交易列表数据以表格形式给出。开发一个程序在python中计算
- flutter - Flutter 使用 workmanager 在准确时间显示本地通知
- r - 使用 dplyr 和管理列值