ngx-notifications
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

install

npm i ngx-notifications

import

@NgModule({
declarations: [
],
imports: [
    NgxNotificationsModule
],
providers: [
    
],
bootstrap: []
})

usage

publish notification

first inject service

  constructor(public notificationsService: NgxNotificationsService) {
  }

then publish

this.notificationsService.publish({
    act: 'open-tip-dialog',
    data: {content: data.content}
});

observer notification

    constructor(public notificationsService: NgxNotificationsService) {
    this.notificationsService.getNotification().subscribe(next => {
    if (next.act === 'open-winner-tip') {
        
    } else if (next.act === 'open-tip-dialog') {
      
    }
    });
}

Readme

Keywords

none

Package Sidebar

Install

npm i ngx-notifications

Weekly Downloads

3

Version

0.0.6

License

none

Unpacked Size

53.4 kB

Total Files

26

Last publish

Collaborators

  • joyzhou007