convert new line /n to a line break in angular convert new line /n to a line break in angular angularjs angularjs

convert new line /n to a line break in angular


This does not replace it, but you can use the CSS attribute white-space: pre-line; to render the \n in the browser:https://developer.mozilla.org/en-US/docs/Web/CSS/white-space

div {  white-space: pre-line;}
<div>Foo   Bar       Baz     Foo     Bar        Baz</div>