Skip to content

Commit

Permalink
Merge pull request #3 from vaniocz/toaster_close_all
Browse files Browse the repository at this point in the history
Added method to close all opened toaster messages.
  • Loading branch information
stanleyk authored Aug 27, 2020
2 parents 8d37234 + bfeb7f4 commit a23ec6d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/toaster/toaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,10 @@ export class Toaster {
}, 500);
}
}

public closeAll(): void {
this.notifications = [];
this.notifications$.next(this.notifications);
this.notificationsCount = 0;
}
}

0 comments on commit a23ec6d

Please sign in to comment.