Skip to content
Advertisement

Adding a new line in MatDialog Content Angular 7

I am using MatDialog and trying to add a new line in the content definition. Both n and </b> are not doing it. Is there another way without having to manually go into the html and change it since it’s a reusable component:

JavaScript

HTML

JavaScript

Advertisement

Answer

You can use the [innerHTML] property:

JavaScript

and instead of nn, use the html br tag.

JavaScript
Advertisement