Reputation: 163
I have the following div in my html:
<div flex style="white-space:pre-wrap;">
{{c.display}}
</div>
c.display
is set like so:
$scope.c.display = "foo\nbar\n\tfoobar";
The output looks like so:
The html source looks like this:
If I change the source on Chrome using the dev tools to this:
I get what I wanted the whole time, which is this:
So, why is this happening and how can I make it stop?
Upvotes: 0
Views: 546
Reputation: 1522
How about removing white-space from within the div?
<div flex style="white-space:pre-wrap;">{{c.display}}</div>
Upvotes: 1