0.0.4 • Published 4 years ago

ngx-smiley-toaster v0.0.4

Weekly downloads
16
License
-
Repository
-
Last release
4 years ago

step 1: install bependents 

npm install ngx-smiley-toaster --save

Setup

step 2: add NgxSmileyToasterModule to app NgModule

import { CommonModule } from '@angular/common';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { NgxSmileyToasterModule } from 'ngx-smiley-toaster'; // ToastrModule imported

@NgModule({
  imports: [
    CommonModule,
    NgxSmileyToasterModule  // ToastrModule added
  ],
  bootstrap: [App],
  declarations: [App]
})
class MainModule {}

step 3: add tag inside app.component.html

<smiley-toaster></smiley-toaster>

Use

step 4: add Service to app Your Component

import { SmileyToasterService } from "ngx-smiley-toaster";

@Component({...})
export class YourComponent {
  constructor(private SmileyTosterS:SmileyToasterService) {}

  createToster() {
    this.SmileyTosterS.create({
      type: "success || info || warning || danger",
      heading:"test heading",
      subheading:"test subheading"
    });
  }
}

Auther

nikiphoros

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago