>> ng new my-first-project The above command will install the material package with CDK and angular animation. But first, have closer look at the internal working of the material icon in details, so lets get started; 1) MatIconRegistry: first we have MatIconRegistry which is a registry, and it is an injectable service that helps and supports us to associate icons name and define aliases for CSS. Registers icon URLs by namespace and name. */ using icons in angular 12. angular material icon css. As we know we will be going to use the mat-icon directive to show our icons on the UI, we just need to create this tag inside the template, lets have a closer look at the syntax for better understanding see below;
2) By the help of this material icon we can display font icon or SVG icon by using the mat-icon directive of angular material. We can use font ligature as an icon by putting the ligature text in the <mat-icon> component.