简体   繁体   English

Angular Material Icons 在图标渲染前显示图标名称

[英]Angular Material Icons Displays Icon Name Before Icon Renders

What supposed to be the problem when the angular material icons renders the icon name first before the icon itself renders.当有角度的材质图标在图标本身呈现之前首先呈现图标名称时,应该是什么问题。 I hosted the angular material icon online and I have a stable internet connection and I think this is not supposed to be the problem.我在线托管了 angular material icon 并且我有稳定的互联网连接,我认为这不应该是问题。 I also already hosted the angular material icons offline, check for the path directories of the material icon css, however, the problem still persist.我也已经离线托管了角度材质图标,检查材质图标css的路径目录,但是问题仍然存在。 It renders the icon name then after a moment when the view renders, it then renders the icon itself.它呈现图标名称,然后在视图呈现一段时间后呈现图标本身。

Below is the actual image of my problem.下面是我的问题的实际图像。 The icon name renders first before the icon itself.图标名称首先呈现在图标本身之前。 Please let me know if there are any solutions like if i can hide the icon name before the icon itself renders because it's really affects the design.请让我知道是否有任何解决方案,例如我是否可以在图标本身呈现之前隐藏图标名称,因为它确实会影响设计。

This is how i display the icon.这就是我显示图标的方式。

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

在此处输入图片说明

have you heard of using rel=preconnect to establish network connections early and increase performance.您是否听说过使用rel=preconnect尽早建立网络连接并提高性能。

Adding rel=preconnect to a <link> informs your browser that your page intends to establish a connection to another domain, and that you like the process to start asap.rel=preconnect添加到<link>通知您的浏览器您的页面打算与另一个域建立连接,并且您希望该过程尽快启动。 This wil load more quickly because the setup process has already been completed by the time the browser requests them.这将加载得更快,因为在浏览器请求它们时设置过程已经完成。

try this one试试这个

<link rel="preconnect" href="http://example.com">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM