md-toast
v0.0.1-alpha.1
Published
Angular 2 Material toast
Downloads
36
Maintainers
Readme
md-toast
Native Angular2 Material Toast service
Installation
npm install --save md-toast
API
Example:
//app-module.ts
import {MdToastModule} from 'md-toast/toast';
@NgModule({
imports: [
MdToastModule,
],
declarations: [
...
]
})
//component.ts
...
import {MdToast} from 'md/toast';
@Component({
selector: "..."
})
export class ... {
...
constructor(private toast: MdToast) { }
toastMe() {
this.toast.show('Toast message...');
--- or ---
this.toast.show({ message: 'Toast message...', hideDelay: 1000 });
}
...
}