Bot releases are visible (Hide)
The default toast component has changed and is now an attribute instead of an element. Classes will be applied to this. Fixes #15
<div class="overlay-container">
<div id="toast-container" class="toast-top-right">
<toast-component>
<div class="toast toast-success" style="opacity: 1;">
<div class="toast-title" aria-label="title">title</div>
<div class="toast-message" aria-label="Message">
Message
</div>
</div>
</toast-component>
</div>
</div>
<div class="overlay-container">
<div id="toast-container" class="toast-top-right">
<div toast-component class="toast-success toast">
<div class="toast-title" aria-label="Title">Title</div>
<div class="toast-message" aria-label="Message">
Message
</div>
</div>
</div>
</div>
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 {}
let customConfig = new ToastConfig();
customConfig.timeOut = 0;
customConfig.onTap.subscribe(() => console.log('tapped'));
this.toastrService.error('waits for tap to close', '', customConfig);
Add config option extendedTimeOut = how long the toast will display after a user hovers.
Silence error from ComponentResolver rc4 -> rc5
Now requires angular rc5 to work and @angular/platform-browser
if you somehow weren't using that already.