1.0.2 • Published 6 years ago

ng-svg-icon v1.0.2

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

ng-svg-icon

Status

Build Status

Installation

To install this library, run:

$ npm install ng-svg-icon --save

Consuming your library

Once you have published your library to npm, you can import your library in any Angular application by running:

$ npm install ng-svg-icon

and then from your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import your library
import { NgSvgIconModule } from 'ng-svg-icon';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    NgSvgIconModule.forRoot({})
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
// To pass default config while importing
NgSvgIconModule.forRoot({
  defaultColor: '#000',
  defaultSize: 50,
  defaultViewBox: '0 0 24 24'
})

Once library is imported, you can use its components in your Angular application:

<!-- Pass custom config to each icon -->
<ng-svg-icon name="help" color="white" size="24" viewBox="0 0 24 24"></ng-svg-icon>
<!-- Pass dynamic icon name -->
<ng-svg-icon [name]="iconName"></ng-svg-icon>

License

MIT © Sanchit Gupta

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago