Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Grid question

$
0
0

Hi again,

I am sure it is doable, but I don't have the knowledge to do it yet.

Here the current code

  <ion-row>
    <ion-col *ngFor="#menu of menus" class="cell-0" (click)="menuSelected(menu)">
      <ion-icon [name]="menu.icon"></ion-icon>
      <ion-label>{{ menu.name }}</ion-label>
    </ion-col>
  </ion-row>

Like you can see, it will create all my cells with different icons and labels, but I don't know how to increment the number of the "class". How can I change "cell-0" to something like "cell-i"? Unless there is a way to apply the cell background color with a different way? It will be nice if it could be something like <ion-col [color]="menu.cellColor">

Thanks


Viewing all articles
Browse latest Browse all 228595

Trending Articles