replace all /n to <br> in html angular code example
Example 1: php replace \n by
$var = str_replace(array("\r\n","\n"),'<br>', $var);
Example 2: javascript replace with n
var str = $("#mydiv").html();
var regex = /<br\s*[\/]?>/gi;
$("#mydiv").html(str.replace(regex, "\n"));