I have a string which contain new line character /n. Trying to display
the string. Instead of taking the /n as new line, it displays '/n' as text.
$scope.myOutput = " Hello /n"
{{ myOutput | textFormat }}
Required -> Hello (on html page)
Tried :
app.filter('textFormat', function() {
return function(x) {
return x.replace(/\\n/g, '<br/>');
}
Tried css styles like white-space: pre;