I've looked into this quite a bit and all I'm seeing are solutions on how to show the newline character as a new line.
I want to show the "\n" as a string in an Angular view. It seems that Angular ignores it by default.
Example Text:
this.myText = "This is my \n example \n string: \n"
Example Output of <div>{{ myText }}</div>:
"This is my example string:"
Desired Output:
"This is my \n example \n string: \n"
Stackblitz: HERE
--
i.e. style="white-space: pre-line" or <pre></pre> or [innerText]="myText" is not what I want to do as I do not want to render the \n as a new line.
Thanks for the help!