How to make ionic line break 3

0

I'm trying to break line inside an object in ionic 3, I already 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 ts file I make a for and retrieve the data and make the connection with an interpolation string in the view

 <div>
     <p>{{ingredientes}}
 </div>
    
asked by anonymous 10.03.2018 / 20:17

1 answer

0

The solution I found to break the line was to set the css white-space = 'pre-line'

    
11.07.2018 / 18:37