flash-text
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Flash-Text

The simplest flash implementation for Angular2 and above versions.

Installation

Run npm install flash-text to to install the package.

Implemtation

import { FlashModule } from 'flash-text' add in app.module.ts and add inject FlashModule in imports array

Next

import { FlashService } from 'flash-text' in your component and add FlashService instance in your constructor like

constuctor(private _flashService:FlashService){}

Next send data to the flash

Eg: this._flashService.request({type:'welcome', message:'Welcome message from flash-text', class:'flash-success'})

here request method accepts an object with below key and values

{type: 'welcome', // which is refer to you flash id

message: 'welcome message from flash', //message that you want to display in flash

class: 'flash-success', // tells the status of flash message it may also contain 1) flash-success, 2) flash-danger, 3) flash-warning, 4) flash-default

}

Include flash id in your view

<flash type="welcome"></flash>

THE END Thank you have some with code :)

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i flash-text

    Weekly Downloads

    2

    Version

    1.1.0

    License

    none

    Unpacked Size

    111 kB

    Total Files

    26

    Last publish

    Collaborators

    • vamshidureddy