@ngu/alert
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

ngu-alert

Angular Universal alert

Installation

npm install @ngu/alert --save

Sample

Include NguAlertModule in your app module:

import { NguAlertModule } from '@ngu/alert';

@NgModule({
  imports: [
    NguAlertModule
  ],
})
export class AppModule { }

Then use in your component:

import { Component, OnInit } from '@angular/core';
import { NguAlertService } from '@ngu/alert';

@Component({
  selector: 'sample',
  template: `<h1>Ngu Alert</h1>`,
})
export class SampleComponent implements OnInit {
    constructor(private alert: NguAlertService)

    ngOnInit() {
        for (i = 0; i < 4; i++) {
            this.alert.open({
                heading: 'This is a heading',
                msg: 'This is a message from alert',
                type: 'success',
                duration: 10000
            });
        }
    }
}

License

MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i @ngu/alert

Weekly Downloads

1

Version

0.3.0

License

MIT

Unpacked Size

278 kB

Total Files

39

Last publish

Collaborators

  • ngu