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

Grid menu not showing items properly

$
0
0

I'm trying to have a menu that show the items in grid menu

but it's showing the same items like this:

here is my code:
HTML

<ion-grid>
        <ion-row *ngFor="let item of items" (click)="itemSelected(item)">
            <ion-col col-6>
                <img [src]="item.image" alt="">
                <p>{{item.name}}</p>
            </ion-col>

            <ion-col col-6>
                <img [src]="item.image" alt="">
                <h3>{{item.name}}</h3>
            </ion-col>
        </ion-row>
    </ion-grid>

*and the other code where i have the objects**

items = [
{
image: "http://ionic.io/img/2.png",
name: 'item1',
},
{
image: "http://ionic.io/img/2.png",
name: 'item2',
},
{
image: "http://ionic.io/img/2.png",
name: 'item3',
},
{
image: "http://ionic.io/img/2.png",
name: 'item4',
}
];


Viewing all articles
Browse latest Browse all 230056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>