I try to display a multi-lined text but it always apears as one line.
For example:
var text ="line 1. \n line 2. \n line 3."
It it supposed to be displayed like :
line 1.
line 2.
line 3.
but instead I end up with
line 1. line 2. line 3.
in a rendered html page.
I tryed jquery text and html methods but not working.
Even through angularjs, it is always the same.
$('#element').text(text);
$('#element').html(text);
or
<div>{{ text }}</div>
Isn't there a way to get what I'm expecting?
line 2.
line 3." and: $('#element').text(text); – bradley546994 Jul 29 '18 at 20:47