Alerts can be used for different purposes such as showing a success or error message or asking the user for an input.
We created a AlertTemplateComponent which is defined in the Shared module to encapsulate the logic and markup of this Alert component.
To display the alerts we use the Material Dialog component.
In src/app/utilities/alerts/alerts.component.html you can find some of the different alerts you can create using this AlertTemplateComponent.
You can pass the following options to the alerts component:
You can pass the following options to the alert component:
icon: 'check', // FontAwesome icon name
iconColor: 'success' | 'failure', // icon color
title: "Here's a message!", // Title of the modal
text: 'The content, // Text of the modal
options: false, // True will display yes or no buttons
input: false, // True will show a text input
button: 'Good', // Texto of the modal button
time: 2000 // Time you want the modal to live (ms)