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 install
to install all required dependencies
Run
npm start
for a local dev server. Navigate tohttp://localhost:4200/
.
Run
npm run lint
to check for ESLint issuesnpm run lint:fix
to automatically fix ESLint issuesnpm run prettier
to check for Prettier issuesnpm run prettier:fix
to automatically fix Prettier issues
Run
npm run test
to execute the unit tests in watch mode for developmentnpm run test:coverage
to execute all unit tests with code coverage
Run
npm run build
to run the production build