hi
i am new with app development using ionic 2. i have a div under ion-list which contains long text.but for some reason text doesn’t format.
attached is screensho
custom the sass or used component such as card
What is the styling on the div? You can use an ion-item
with the text-wrap
attribute:
<ion-item text-wrap>
Multiline text that should wrap when it is too long
to fit on one line in the item. Attribute on .item
</ion-item>
ah,Updated doc as soon as possible
Thankkkkkk youuuuuuu…finally found the answer …!!
How to make a new line for \n ? text-wrap not work for \n
<br/>
gives you a new line in HTML.
If I have a ‘\n’ in json {‘msg’:‘abc \n def’} , my question is how to display ‘abc’ and ‘def’ in multiline ?
Cool! But, how do this in ion-title?
<ion-header>
<ion-navbar>
<ion-title text-wrap>text text text text text text text text text text text text ?</ion-title>
</ion-navbar>
</ion-header>
the code above not working
Does anybody know the answer? I have the same problem: how to make ion-title responsive. I tried text-wrap and responsive-sm, but neither works.
Thanks.
use something of the sort in your css:
p{ white-space: pre-line; }
Aparantely, is not possible make ion-title responsive
Yeah, I figured it out already. Which is kind of strange feature. I don’t really understand the motivation behind it. I think Ionic team should re-think it.