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

    Install

    npm i md-toast

    DownloadsWeekly Downloads

    7

    Version

    0.0.1-alpha.1

    License

    MIT

    Last publish

    Collaborators

    • avatar