AngularJS is rendering
as text not as a newline

后端 未结 5 1184
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-14 00:10

I am sure this has been asked before but I cannot find the answer.

I have an AngularJS script that is pulling from a DB and then rendering to content. Everything is

5条回答
  •  再見小時候
    2020-12-14 00:33

    You can use \n to concatenate words and then apply this style to container div.

    style="white-space: pre;"
    

    More info can be found at https://developer.mozilla.org/en-US/docs/Web/CSS/white-space

    This is normal text.

    This text contains new lines.

提交回复
热议问题