@ngu/alert

Angular Universal alert

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
01Mar 11, 2020Dec 3, 2017Minified + gzip package size for @ngu/alert in KB

Readme

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.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.