How to Create a Toast Service Using Angular 14 and Bootstrap 5
Introduce a common notification pattern to inform your users

In most web applications there is a requirement to display some kind of notifications to the user. A common UX pattern for this is so-called toast notifications.
A toast in this context can be simply explained as a piece of information that pops up somewhere on the screen. In this post, we want to have a look on how to create a service for sending Bootstrap 5 toast notifications using Angular 14.
Structure of the Toaster
Our Angular Toaster consists of the following three parts:
ToastService
that provides the methods for sending the toastsToasterComponent
that takes care of managing and stacking current toastsToastComponent
that presents a single toast notification

Creating the Toast Service
First, we need to create the toast service that we can later call from our application to send different types of toasts.
For the service, we use RxJS to handle our toast events using Observables.