1.1.0 • Published 4 years ago

flash-text v1.1.0

Weekly downloads
30
License
-
Repository
github
Last release
4 years ago

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 :)

1.1.0

4 years ago

1.0.0

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago