md-toast
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-alpha.1 • Public • Published

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 });
   }
 
   ...
 
}

Versions

Current Tags

Version History

Package Sidebar

Install

npm i md-toast

Weekly Downloads

3

Version

0.0.1-alpha.1

License

MIT

Last publish

Collaborators

  • dharmeshpipariya