Alerts
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:
1
You can pass the following options to the alert component:
2
{
3
icon: 'check', // FontAwesome icon name
4
iconColor: 'success' | 'failure', // icon color
5
title: "Here's a message!", // Title of the modal
6
text: 'The content, // Text of the modal
7
options: false, // True will display yes or no buttons
8
input: false, // True will show a text input
9
button: 'Good', // Texto of the modal button
10
time: 2000 // Time you want the modal to live (ms)
11
}
Copied!
alerts
alerts
Last modified 1yr ago
Copy link