Answer the question
In order to leave comments, you need to log in
How not to escape line break in Angular2?
<div>
<textarea [(ngModel)]="comment.text"></textarea>
</div>
<div>{{comment.text}}</div>
<div [innerHTML]="comment.text"></div>
Answer the question
In order to leave comments, you need to log in
try using pre tags instead of div?<pre>{{comment.text}}</pre>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question