ngx-smiley-toaster
v0.0.4
Published
<div align="center"> <img src="http://webphoros.com/assets/images/ngx-smiley-toster.jpg" width="300" alt="Angular Toastr"> <br> <h1>ngx-smiley-toaster 0.0.3</h1> </div> ## Install
Downloads
2
Readme
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"
});
}
}