npm i pb-ngx-toast --save
@import '../node_modules/pb-ngx-toast/style.css';
<ngx-toast-queue></ngx-toast-queue>
import { ToastrModule } from "pb-ngx-toast";
@NgModule({
imports: [
BrowserModule,
ToastrModule
],
declarations: [
AppComponent
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
constructor(private _toastrService: ToastrService)
let configuration : new ToastrConfig =
{
position: ToastPositionEnum.BOTTOM_RIGHT,
timeout: 5000,
progressBar: true
}
this._toastrService.success(message, title, configuration);
this._toastrService.error(message, title, configuration);
this._toastrService.warning(message, title, configuration);
this._toastrService.info(message, title, configuration);