
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
mat-icon-import
Advanced tools
npm i mat-icon-import
#or
yarn add mat-icon-import
At first download the icons you need from here in SVG 24px format (default). The icon names are of type baseline-[key]-24px.svg
. You will have to use the key
when importing this lib.
Import the IconImportModule
in your application module and call the forRoot()
function with two parameters. At first the array of icon keys, e.g. (account_circle, add or whatever you want). The secont parameter is the path where you store the icons in your assets folder.
import { IconImportModule } from 'mat-icon-import';
@NgModule({
imports: [ IconsModule.forRoot(['account_circle'], './assets/mat-icons') ]
})
export class AppModule {}
Register the icons where you need them. E.g. in the AppComponent
to make it available in the complete application.
import { IconImportService } from 'mat-icon-import';
@Component({
...
})
export class AppComponent {
constructor (private iconService: IconImportService) {
this.iconService.register();
}
}
Use the registered icons with
<mat-icon svgIcon="account_circle"></mat-icon>
Don't forget to include the MatIconModule
from @angular/material
.
FAQs
Include only used material icons in SVG format and reduce package size
The npm package mat-icon-import receives a total of 38 weekly downloads. As such, mat-icon-import popularity was classified as not popular.
We found that mat-icon-import demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.