Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/guptasanchit90/ng-svg-icon

Using SVG icons in angular 4+ projects. Inspired from https://github.com/klarsys/angular-material-icons
https://github.com/guptasanchit90/ng-svg-icon

angular-material angular2 angular4 angular5 ionic2 ionic3 material-design material-icons

Last synced: 3 months ago
JSON representation

Using SVG icons in angular 4+ projects. Inspired from https://github.com/klarsys/angular-material-icons

Awesome Lists containing this project

README

        

# ng-svg-icon

* GITHUB : https://github.com/guptasanchit90/ng-svg-icon

* NPM : https://www.npmjs.com/package/ng-svg-icon

* Demo : https://ng-svg-icons.netlify.com/

## Status
[![Build Status](https://travis-ci.org/guptasanchit90/ng-svg-icon.svg?branch=master)](https://travis-ci.org/guptasanchit90/ng-svg-icon)

## Installation

To install this library, run:

```bash
$ 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:

```bash
$ npm install ng-svg-icon
```

and then from your Angular `AppModule`:

```typescript
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 { }
```

```typescript
// 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:

```xml

```

```xml

```

## License

MIT © [Sanchit Gupta](mailto:[email protected])