简体   繁体   中英

Default Icon List of Angular Material 2+

I need to see a default list of Icons for Angular Material https://material.angular.io/components/icon/overview

I am not using Font Awesome and Google Fonts

是你要找的吗?

The Angular Material Icon component actually isn't pre-loaded with the Google Material Design Icons, I'm afraid.

According to the documentation for Icon overview :

By default, <mat-icon> expects the Material icons font . (You will still need to include the HTML to load the font and its CSS, as described in the link).

This is located under the "Font icons with ligatures" header. I'm also emphasizing on the word "expects" here

And it even states under the Getting Started guide that you should add the Material Icons font to your index.html :

If you want to use the mat-icon component with the official Material Design Icons, load the icon font in your index.html.

So, you have to load an icon font (or an SVG iconset) in your app. You'll have to do it yourself.

Here's some font icons/ SVG icons you can use:

If you going to use Lars answer . The following code will set the icon in your angular project

<span class="material-icons">home</span>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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