0.0.8 • Published 4 years ago

ng-fontawesome-icon v0.0.8

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

NG Fontawesome Icon

🍺 NG Fontawesome Icon for Angular Lovers. Coded by Bootcatch.

NPM NPM JavaScript Style Guide

Installation

Using NPM:

npm i ng-fontawesome-icon --save

npm i font-awesome --save

In your styles.scss file import font-awesome css

/* You can add global styles to this file, and also import other style files */
@import "font-awesome/css/font-awesome.min.css";

Usage

Import direct in your app.module.ts file:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';

//import NgFontawesomeModule from ng-fontawesome
import { NgFontawesomeModule } from "ng-fontawesome-icon";

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    //import your NgFontawesomeModule here
    NgFontawesomeModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Then use wherever you want !! Goodluck:

  <ng-fontawesome icon="file" size="2" color="orange"></ng-fontawesome>

Note

ng-fontawesome

  • Add only name to icon, e.g icon="file"
  • No need to add full name like e.g icon="fa fa-file"
  • *icon - font-awesome icon name will find here here*
  • *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.