AngularJS: newline characters to paragraph elements

后端 未结 4 1748
遥遥无期
遥遥无期 2020-12-31 21:17

Within Angular, I need to generate a series of paragraph elements from a block of text containing newline characters?

I can think of a couple of ways to do this. Ho

4条回答
  •  天涯浪人
    2020-12-31 22:18

    You might solve this with css property and use {{text}} into p html element

     white-space: pre-line;
    

提交回复
热议问题