Angular nl2br

newline to br You don’t need any fancy pipes, all you need is plain old css. Add the following to your name.component.css or name.component.scss (where name is the name of your component)

and later in your html, assuming your variable is called message.body

And done. Enjoy simplicity.

Published
Categorized as Allgemein