New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ng2-growl

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-growl

Simple notifications module for angular 2

latest
Source
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source

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'});


Keywords

angular2

FAQs

Package last updated on 27 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts