Vereb
Vereb

Reputation: 85

Ionic 2 - building grid

I was searching for informations about IONIC 2 grid but I didn't find complex description of it. I've got some questions:

  1. Can I include one <ion-grid> inside another <ion-grid>?
  2. If I have some modules can I build grid for every module separately?
  3. If not maybe I should declare <ion-grid> higher in DOM than modules and in modules operate only on <ion row> and <ion-col>
  4. I find something like that:

    <div class="row"><div class="col-6"></div><div class="col-6"></div> </div>

Is that IONIC (maybe the old one)? In IONIC2 it should look like:

<ion-row">
<ion-col col-6"></ion-col>
<ion-col col-6"></ion-col>
</ion-row>

Am I right?

PS. Thats my first post on stackoverflow :D Jupi!!

Upvotes: 0

Views: 71

Answers (1)

JoeriShoeby
JoeriShoeby

Reputation: 1374

Can I include one inside another ?

Yes you can, but I haven't seen a use case where this was required.

If I have some modules can I build grid for every module separately?

Yes you can, you should see <ion-grid> the same as any other Ionic component like <ion-item> or <ion-card>. Use them as much as you need them in any module.

I find something like that:

<div class="row"><div class="col-6"></div><div class="col-6"></div>
</div>

This is the old version of the , proper use and more information about the <ion-grid> component can be found here

Upvotes: 1

Related Questions