github scttcper/ngx-toastr 1.3.0

latest releases: v14.2.2, v14.2.1, v14.2.0...
5 years ago

Remove use of { provide } from @angular/core which is gone in rc.6

New method of overriding global defaults inspired by angular2-jwt. If you're sticking with defaults importing ToastrModule into your NgModule is enough.

import { NgModule } from '@angular/core';
import { ToastrModule, provideToastr } from 'toastr-ng2';

@NgModule({
  bootstrap: [App],
  declarations: [App],
  // Import Toastr!
  imports: [ ToastrModule ],
  providers: [
    // Override options here
    provideToastr({
      timeOut: 500,
    })
  ]
})
class ExampleMainModule {}

Don't miss a new ngx-toastr release

NewReleases is sending notifications on new releases.