0.0.6 • Published 5 years ago

ngx-notifications v0.0.6

Weekly downloads
24
License
-
Repository
-
Last release
5 years ago

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') {
      
    }
    });
}
0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago