Bot releases are hidden (Show)
Big thanks to @yarrgh in #34
// your @NgModule
imports: [
ToastrModule.forRoot({ alwaysOnTop: false, timeOut: 10000 })
]
this.toastrService.success('message', 'title', {timeOut: 10000 });
##Breaking changes:
before
@NgModule({
imports: [
ToastrModule
]
})
export class AppModule { }
after
@NgModule({
imports: [
ToastrModule.forRoot()
]
})
export class AppModule { }
import { ToastrConfig } from 'toastr-ng2';
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
constructor(config: ToastrConfig) {
// your global config here
config.timeOut = 100;
}
}