I have some html for the warning window. Using interpolation, I can reuse the same html to display several different warning messages. It looks like this:<p>{{ myAlertMessage }}</p>
Now I want to show a longer alert message containing line breaks. However, I cannot change the property of the interpolated component (which is a string) in any way that will result in line breaks.
For example, using </br>, or dividing the text into several lines in the component code (contained in parentheses or inverse ticks) or on a new line code ( ). None of these functions create a line break in the text when a warning message is displayed.
I would prefer not to add additional property bindings to satisfy this particular use case.
Thanks in advance.
source
share