NGX Growl
NGX Growl is a module that displays growl like messages
Dependencies
- @angular/common
- @angular/core
- ngx.logger
Installation
npm install --save ngx-growl
Once installed you need to import our main module:
;
The only remaining part is to list the imported module in your application module, passing in a config to intialize the logger.
@
Config Options
- maxMessages - The maximum number of messages allowed to be displayed at a time
- displayTimeMs - The time a message will display before being automatically hidden in milliseconds
Usage
To use NGX Growl, you will need to add it to your an application html file
<ngx-growl></ngx-growl>
Import the service
;
Intect the service
constructorprivate growlService: GrowlService
Then call one of the methods
this.growlService.addError`You're Error message goes here`;this.growlService.addError;