Skip to content

Latest commit

 

History

History
33 lines (30 loc) · 589 Bytes

README.md

File metadata and controls

33 lines (30 loc) · 589 Bytes

Toastr

Install

npm install @chan4lk/toastr

Configure

import { ToastrCoreModule, CLOSE_LABEL } from '@chan4lk/toastr/core';
@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule, ToastrCoreModule],
  providers: [{
    provide: CLOSE_LABEL,
    useValue: 'hide'
  },],
  bootstrap: [AppComponent],
})
export class AppModule {}

Show Message

export class AppComponent {
  constructor(private toastr: ToastrService) {
    this.toastr.show({
      message: 'Test message',
      isSuccessMessage: false,
    });
  }
}