README
Ng Material Icon
🍺 Materail Icons for Angular Lovers. Coded by Bootcatch.
Installation
Using NPM:
npm i ng-material-icon --save
npm i material-icons --save
In you angular.json
Add Material icon css.
"styles": [
// "src/styles.scss",
"./node_modules/material-icons/iconfont/material-icons.css"
],
Or
In your styles.scss
file Import Material icon css
/* You can add global styles to this file, and also import other style files */
@import "material-icons/iconfont/material-icons.css";
Usage
Import direct in your app.module.ts
file:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
//import NgMaterialIconModule from ng-material-icon
import { NgMaterialIconModule } from "ng-material-icon";
@NgModule({
declarations: [
],
imports: [
BrowserModule,
//import your NgMaterialIconModule here
NgMaterialIconModule
],
providers: []
})
export class AppModule { }
Then use wherever you want !! Goodluck:
<ng-material-icon icon="check_circle" size="3" color="red"></ng-material-icon>
Note
Add only name to icon, e.g
icon="check_circle"
icon - Material Icon names will find here material icons
size - Icon size in
rem
.color - You can give any valid value
e.g red, yellow, #fffff, #ff0000.
Author
Ajay Marathe
Copyright and License
Copyright 2019 Ajay Marathe. Code released under the MIT license.