I got json Data that output text with returns:
Now i try to output it with:
<div [innerHTML]="message.content"></div>
What can i do, that he show the returns?
The [innerHTML]
will render HTML, when you are saying returns i'm assuming you are referring to \r\n
carriage returns and line feeds. This is not HTML.
What you need to do is pass in HTML for your \r\n
as for example <br />
`. See also https://stackoverflow.com/questions/37076867/in-rc-1-some-styles-cant-be-added-using-binding-syntax/37076868#37076868 – ` or similar, or replace returns with `Günter Zöchbauer Aug 18 '17 at 09:55