pb-ngx-toast
TypeScript icon, indicating that this package has built-in type declarations

3.5.2 • Public • Published

# Custom messages service

This project contains a toast message library

Quick Start

# Install package 
npm i pb-ngx-toast --save
 
# Import css style.css 
@import '../node_modules/pb-ngx-toast/style.css';
# Add component markup 
<ngx-toast-queue></ngx-toast-queue>
 
# Import module in your app module 
import { ToastrModule } from "pb-ngx-toast";
 
@NgModule({
  imports: [
    BrowserModule,
    ToastrModule
  ],
  declarations: [
    AppComponent
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
# Calling service 
 constructor(private _toastrService: ToastrService)
# Default configuration 
 let configuration : new ToastrConfig =
  {
    position: ToastPositionEnum.BOTTOM_RIGHT,
    timeout: 5000,
    progressBar: true
  } 
# Example messages 
 this._toastrService.success(message, title, configuration);
 this._toastrService.error(message, title, configuration);
 this._toastrService.warning(message, title, configuration);
 this._toastrService.info(message, title, configuration);
 

Package Sidebar

Install

npm i pb-ngx-toast

Weekly Downloads

48

Version

3.5.2

License

MIT

Unpacked Size

170 MB

Total Files

95

Last publish

Collaborators

  • pedrobaez