dimakuba / ng-noty

ng-noty is a service for displaying notifications
0 stars 1 forks source link
angular4 notifications service typescript

ng-noty

ng-noty is a service for displaying notifications.

Install

$ npm install --save ng-noty

Prerequisites

ng-noty is based on Noty 3.1.x

Usage

import {Component} from '@angular/core';
import {NgNoty, NotyOptions} from "ng-noty";

@Component({
  selector: 'ng-noty-component-example',
  template: `
    <button (click)="openNgNoty()" aria-label="Show an example ng-noty">
      Show ng-noty
    </button>
  `,
})
export class NgNotyComponentExample {
  constructor(public ngNoty: NgNoty) {}

  openNgNoty() {
    this.ngNoty.create(<NotyOptions>{
        text: 'Some notification text'
    }).show();
  }
}