npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ngx-notification

v1.0.5

Published

Angular Library to display all types of notifications in a Toast Notification format. Tested on Angular 6

Downloads

23

Readme

ngx-notification

Angular Library to show all types of notifications in a Toast Notification format. It is very simple to setup and can be used for all types of notifications you want to show.

Parameters are: Message, Theme and Position.

You can also use your own custom css by setting the Theme parameter to 'none'.

Tested on Angular 6+

Install

npm install ngx-notification --save

Usage Example:

** Step 1: (After Installing) **

Add the Notification Component to your app.module.ts

import { NgxNotificationComponent } from 'ngx-notification';

and add:

NgxNotificationComponent

to the declarations part of the module.

You app.module might look like this:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

import { NgxNotificationComponent } from 'ngx-notification';

@NgModule({
  declarations: [
    AppComponent,
    NgxNotificationComponent
  ],
  imports: [
    BrowserModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

** STEP 2: (Add the Service to you component(s) where you want to display the Notifications) **

In this case we are going to display notifications in the app.component.html

app.component.ts (Here is an example:)

import { Component } from '@angular/core';
import { NgxNotificationService } from 'ngx-notification';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  constructor(private ngxNotificationService: NgxNotificationService) {}

  sendNotification() {
  	this.ngxNotificationService.sendMessage('This is my message to you!', 'dark', 'bottom-right');
  }

}

** STEP 3: **

All we need to do is to add:

<lib-ngx-notification></lib-ngx-notification>

to the app.component.html page.

In this example we are going to add a button click to show the Notification so the app.component.html page would look like this:

<button (click)="sendNotification()">Click here to test message</button> <br><br>

<lib-ngx-notification></lib-ngx-notification>

** And that is all! **

PARAMETERS / OPTIONS

The notifications are send like this:

this.ngxNotificationService.sendMessage('This is my message to you!', 'dark', 'bottom-right');

-- The first parameter is the Message which is a String.

-- The second parameter is the Theme.

  • Options available are:

    dark, light, success, info, warning, danger and none.

If you use 'none' you can then add you own css to it by targetting class: ngx-notification

So, an example to add your own custom colors would be:

 .ngx-notification {
   background-color: #2d2d30;
   border-color: #272729;
   color: #c9c9c9;
 }

You would just add your own colors.

-- The last parameter is the position where you want the Notification to appear.

  • Options are:

    top-left, top-right, bottom-left, bottom-right and center

Author

Steven Fernandez

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Changelog

[0.0.1] - 2018-05-12

Added

  • First Commit

[1.0.0] - 2018-05-19

Added

  • Updated Instructions on README

[1.0.1] - 2018-05-19

Added

  • Updated Instructions on README and Keywords

[1.0.2] - 2018-05-19

Added

  • Updated README - Cleaned Formatting

[1.0.3] - 2018-05-19

Fixed

  • Updated README - Spelling Fixed

[1.0.4] - 2018-05-19

Added

  • Updated - Package.json

[1.0.5] - 2018-05-19

Added

  • Updated - Package.json