0

It seems that binding removes returns from a string.

<div>{{obj.progress}}</div>

when I inspect the object in the console I get:

enter image description here

but in the HTML I see:

enter image description here

I would like the words to be displayed with the returns like:

block 1



block 2

... 

Can I force the returns?

I have tried using ng-bind-html and ng-bind as well.

Community
  • 1
  • 1
Niles Tanner
  • 3,911
  • 2
  • 17
  • 29
  • 1
    and you're positive this has nothing to do with the fact that browsers don't render returns in html other than within pre and/or code blocks, or with css `white-space`? – Kevin B Sep 06 '16 at 21:18
  • @KevinB I did not know that could be the case, very insightful. – Niles Tanner Sep 06 '16 at 21:20
  • I was able to solve this issue with this post: http://stackoverflow.com/questions/784539/how-do-i-replace-all-line-breaks-in-a-string-with-br-tags – Niles Tanner Sep 06 '16 at 21:20

0 Answers0