Alert Notification Service for Angular Component | ngx-alerts

NGX-ALERTS is a simple and clean alert notification component of Angular 4+.

angular alert, angular alert popup, custom alert in angular, angular alert popup example, angular alert message on click, alert in typescript angular, angular notification component

How to make use of it:


$ npm install ngx-alerts --save

1. Then from Appmdule angular:

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

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

// Import BrowserAnimationsModule
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";

// Import your library
import { AlertModule } from 'ngx-alerts';

  declarations: [
  imports: [

    // Specify your library as an import
    AlertModule.forRoot({maxMessages: 5, timeout: 5000, position: 'right'})
  providers: [],
  bootstrap: [AppComponent]
export class AppModule { }

2. Once your library is imported, you can use its components and serve it in your angular application:

<!-- You can now use your library component in app.component.html -->
export class AppComponent {

    constructor(private alertService: AlertService) {}
    showAlerts(): void{'this is an info alert');
        this.alertService.danger('this is a danger alert');
        this.alertService.success('this is a success alert');
        this.alertService.warning('this is a warning alert');

alert service for angular, ngx-alerts Plugin/Github

See Demo And Download

Official Website(MathijsBlok): Click Here

This superior jQuery/javascript plugin is developed by MathijsBlok. For extra advanced usage, please go to the official website.

Related Posts


Star Rating Plugin Control Based On Radio Buttons

Star Rating Radio Buttons, the star rating plugin is a plugin for the jQuery Javascript library that creates a non-intrusive star rating control based on a set…


A Pure QRCode Encode and Decode JavaScript Library | Decoding/Encoding

QR Code With Pure JavaScript – A pure JavaScript QRCode encode and decode library. QR code encoder and decoder instruments help you shortly generate QR codes from…


Simple and Lightweight Vertical 3-Dot Context Menu

The 3-dot Context Menu allows for a simple and lightweight implementation to show 3 vertical dots allowing the user to click and show a menu. Below is…


Pure Toast Notification JavaScript Library | Toastify JS

Toast Notification JavaScript – Toastify JS is an easy, lightweight, vanilla JavaScript library used for sending stackable, non-blocking toast messages to end customers. Features Multiple stacked notifications…


Dialogs Based on Bootstrap 5 Modal Component | BS-DIALOGS

BS-DIALOGS is a small library for creating modal windows for notification and input using the Bootstrap 5 modal. It automatically handles DOM processing and provides callbacks to…


Creating Swipeable Image Carousel | Slider-cut

slider-cut is a modern, responsive, effective, and easy-to-use mobile circular component that enables you to rotate through images by mouse drag and touch gestures or by pressing…