Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

md-toast

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

Install

npm i md-toast

DownloadsWeekly Downloads

10

Version

0.0.1-alpha.1

License

MIT

Last publish

Collaborators

  • avatar