Skip to content

Commit

Permalink
docs: update onTap doc to to use toast reference (#969)
Browse files Browse the repository at this point in the history
updated commit to resign with proper gpg key

Co-authored-by: Ross Bender <[email protected]>
  • Loading branch information
l3ender and Ross Bender authored Jan 3, 2023
1 parent bd19dfb commit b83d718
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,14 +394,12 @@ ngOnInit() {

```ts
showToaster() {
this.toastr.success('Hello world!', 'Toastr fun!')
.onTap
.pipe(take(1))
.subscribe(() => this.toasterClickedHandler());
const toast = this.toastr.success('Hello world!', 'Toastr fun!');
toast.onTap.pipe(take(1)).subscribe(() => this.toasterClickedHandler(toast));
}

toasterClickedHandler() {
console.log('Toastr clicked');
toasterClickedHandler(toast: ActiveToast<any>) {
console.log(`Toastr ${toast.toastId} clicked`);
}
```

Expand Down

0 comments on commit b83d718

Please sign in to comment.