I need assistance in displaying an alert message when the user selects a checkbox. We have a shared alert service component that is being utilized by every module.
My current code snippet is as follows:
if(this.checkboxvalue)
{
this.alertservice.error('Hello again! This is how we add line breaks to an alert box!')
}
The desired format for the alert message is:
Hello again! This is how we add
line breaks to an alert box!
However, the message is currently displayed in a single line.
I have attempted using \n, \\n ,<br\>
without success.
If anyone can provide guidance on achieving the desired formatting, it would be greatly appreciated.
Thank you in advance :)