1.0.7 • Published 5 years ago

ang10-growl v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

NGX Growl

NGX Growl is a module that displays growl like messages

Dependencies

  • @angular/common
  • @angular/core
  • ngx.logger

Installation

npm install --save ang10-growl

Once installed you need to import our main module:

import {GrowlModule} from 'ang10-growl';

The only remaining part is to list the imported module in your application module, passing in a config to intialize the logger.

@NgModule({
  declarations: [AppComponent, ...],
  imports: [GrowlModule.forRoot({maxMessages: 10, displayTimeMs: 5000}), ...],
  bootstrap: [AppComponent]
})
export class AppModule {
}

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

<ang10-growl></ang10-growl>

Import the service

import {GrowlService} from 'ang10-growl';

Intect the service

  constructor(private growlService: GrowlService) {  }

Then call one of the methods

this.growlService.addError(`You're Error message goes here`);
this.growlService.addError({heading: 'Oops', message: 'an error has occured'});
1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago