Miss any of our Open RFC calls?Watch the recordings here! »

md2-toast

0.0.1-alpha.0 • Public • Published

md2-toast

Native Angular2 Material Toast service

Installation

npm install --save md2-toast

API

Example:

//app-module.ts
 
import {Md2ToastModule} from 'md2-toast/toast';
 
@NgModule({
 imports: [
   Md2ToastModule,
 ],
 declarations: [
   ...
 ]  
})
 
//component.ts
 
...
 
import {Md2Toast} from 'md2/toast';
 
@Component({
   selector: "..."
})
 
export class ... {
   
   ...
   constructor(private toast: Md2Toast) { }
   toastMe() {
     this.toast.show('Toast message...');
 
     ---  or  ---
 
     this.toast.show({ message: 'Toast message...', hideDelay: 1000 });
   }
 
   ...
 
}

Install

npm i md2-toast

DownloadsWeekly Downloads

1

Version

0.0.1-alpha.0

License

MIT

Last publish

Collaborators

  • avatar