Skip to content

dbfannin/ng2-growl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NG2 Growl

NG2 Growl is a module that displays growl like messages

Dependencies

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

Installation

npm install --save ng2-growl

Once installed you need to import our main module:

import {GrowlModule} from 'ng2-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({...}), ...],
  bootstrap: [AppComponent]
})
export class AppModule {
}

Usage

To use NG2 Growl, you will need to add it to your an application html file

<ng2-growl></ng2-growl>

Import the service

import {GrowlService} from 'ng2-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'});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published