🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

ez-notifier

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ez-notifier

Notifier for Angular

latest
npmnpm
Version
2.0.6
Version published
Weekly downloads
22
29.41%
Maintainers
1
Weekly downloads
 
Created
Source

ez-notifier

Minimalistic design, simple, customizable, and easy-to-use notification library for your Angular 2+ application.

Installation

Run npm install ez-notifier

Code - app.module.ts

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

import { AppComponent } from './app.component';
import { NotificationBarComponent } from './notification-bar/notification-bar.component';
import { NotifierModule, NotifierService } from 'ez-notifier'

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

Show notification at component.

import { Component, OnInit } from '@angular/core';
import { NotifierService } from'notifier'

@Component({ selector: 'app-notification-bar',
templateUrl: './notification-bar.component.html',
styleUrls: ['./notification-bar.component.scss']
})
export class NotificationBarComponent implements OnInit {

myMessage = 'This is a simple text message from componenet..'
constructor(private notifier: NotifierService) { }

ngOnInit() {
}

showNotification(){
this.notifier.show(this.myMessage, 'error');
}
}

Configuration

Error: this.notifier.show(this.myMessage, 'error');
Warining: this.notifier.show(this.myMessage, 'warning');
Success: this.notifier.show(this.myMessage, 'success');

Keywords

notifier

FAQs

Package last updated on 16 Jun 2019

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