Placing ion-label inside ion-grid in an ion-item fails to render the entire grid
If you have a ion-grid inside ion-item and placing ion-label together with some other components inside ion-grid is causing issue with rendering the entire grid.
Here is a post that I have created in ionic forum.
Below is the markup from that post
<ion-list>
<ion-item *ngFor="let order of orders">
<ion-grid>
<ion-row>
<ion-col>
<ion-icon name="pie" item-left></ion-icon>
</ion-col>
<ion-col>
<ion-label>{{order.number}}</ion-label>
<ion-label>{{order.quantity}}</ion-label>
</ion-col>
<ion-col>
<ion-label>{{order.productType}}</ion-label>
<ion-label>
<ion-icon name="calendar"></ion-icon>{{order.date}}</ion-label>
</ion-col>
</ion-row>
</ion-grid>
</ion-item>
</ion-list>
As @brandyscarney pointed out in another post regarding ion-item, it is actually ion-label that is actually causing the issue, and also pointed out that this issue could be something to do with issue in content projection of angular 2.
Hello, thanks for opening an issue with us! Would you be able to provide a plunker that demonstrates this issue? Thanks for using Ionic!
Hello @vijquick just to update you on what ive found. After some testing this looks to be a content projection issue. It looks like the ion-grid never even gets rendered, which points me towards content projection.
Hello @vijquick, after discussing this with my teammates it seems to be partly by design, and partly an angular issue that this does not work. As a workaround for this i would recommend not using ion-grid and just use css to do your layout. Sorry that i could not give you a better answer, and thanks for using Ionic!
I think this is still an issue with RC3. Will use the suggestion above.
avoiding the ion-grid is the best solution
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.