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

0.0.3 • Public • Published

Toast component for your angular2 project

Manual

Import ToastrModule to your main module and call forRoot

import { ToastrModule } from 'ng-toast-2'

@NgModule({
    imports: [
        ToastrModule.forRoot(),
    ]
})
class MainModule {}

Include toast-container some where in your template

<router-outlet/>
<toast-container/>

Show toast by calling ToastManager's method

@Component({
    // ...
})
class SomeComponent {
    constructor(
        private toastMan: ToastManager
    ) {
        this.toastMan.success('title', 'body')
    }
}

License

                    DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                                    Version 2, December 2004

Copyright (C) 2016 DgmTeam <contact@digimed.vn>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

                    DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.

Readme

Keywords

none

Package Sidebar

Install

npm i ng-toast-2

Weekly Downloads

0

Version

0.0.3

License

WTFPL

Last publish

Collaborators

  • mahpah