@railinc/rl-toasty
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

rl-toasty

rl-toasty shows alerts and messages for your Angular application. It is a service that sets the default configuration for ng2-toasty and simplifies the API of ng2-toasty.

Installation

To install this library, run:

$ npm install @railinc/rl-toasty --save

Usage

You can import rl-toasty in any Angular application:

and then from your component:

import { RlToastyService } from '@railinc/rl-toasty';

@Component({
    selector: 'your-component',
    templateUrl: './your-component.html'
})

export class YourComponent {
    constructor(private rlToastyService: RlToastyService) {}

    addToast() {
        // Add all possible types in one shot
        this.rlToastyService.addToast('info', 'Your info message');
        this.rlToastyService.addToast('success', 'Your success message');
        this.rlToastyService.addToast('error', 'Your error message');
        this.rlToastyService.addToast('warning', 'Your warning message');
    }
}

Once your library is imported, you can use it in your Angular application:

Development

To generate all *.js, *.js.map and *.d.ts files:

$ npm run tsc

To lint all *.ts files:

$ npm run lint

License

MIT © Bruce Gong

Readme

Keywords

Package Sidebar

Install

npm i @railinc/rl-toasty

Weekly Downloads

2

Version

0.0.4

License

MIT

Last publish

Collaborators

  • railinc_developer
  • redroger
  • derek_carter