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

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

Dependents (0)

Package Sidebar

Install

npm i md2-toast

Weekly Downloads

1

Version

0.0.1-alpha.0

License

MIT

Last publish

Collaborators

  • dharmeshpipariya