How to make Ionic line break 3

Asked

Viewed 2,879 times

-1

I’m trying to break line inside an object in Ionic 3, I’ve tried with n, n with
and nothing works the text always comes out in a single line, someone knows a solution thanks, follow the code

export const listaCafe = [
  ingredientes: 
    "2 copos de farinha de grão-de-bico\n"+
    "2 copos de leite\n"+
    "4 colheres (chá) de fermento químico em pó\n"+
    "3 unidades de ovo\n"+
    "1 colher (chá) de sal\n"+
    "3 colheres (sopa) de manteiga sem sal\n"+
    "• tempero sugestão: salsinha, cebolinha, coentro e alecrim."
 ]

in my file ts i do a for and recover the data and make the connection with an Interpolation string in the view

 <div>
     <p>{{ingredientes}}
 </div>

1 answer

0


The solution I found for line breaking was set in css white-space='pre-line'

Browser other questions tagged

You are not signed in. Login or sign up in order to post.