The idea of the project was to create a service that allows displaying different types of toast notifications to the user, e.g. success or error toasts.
The application consists of essentially three components: A toast component that represents a single toast notification, a toaster component that maintains and stacks all current toasts, and the toast service. How the solution was built and works in detail is also explained in the following Medium post:
How to Create a Toast Service Using Angular 14 and Bootstrap 5
To get the toast service up and runnning locally, all you need to do is open the repository with VS Code and install all the recommended extensions.
Run
npm installto install all required dependencies
Run
npm startfor a local dev server. Navigate tohttp://localhost:4200/.
Run
npm run lintto check for ESLint issuesnpm run lint:fixto automatically fix ESLint issuesnpm run prettierto check for Prettier issuesnpm run prettier:fixto automatically fix Prettier issues
Run
npm run testto execute the unit tests in watch mode for developmentnpm run test:coverageto execute all unit tests with code coverage
Run
npm run buildto run the production build