Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

If condition inside for loop

$
0
0

@subhajit25mondal wrote:

abc = [{ name : 'Rozy', gender : 'female' }, { name : 'Dave' , gender : 'male'}, { name : 'Paul' , gender : 'male'}, { name : 'Maria' , gender : 'female'}];

I want to display the names from the above array who are male
i want to filter the array in the home.html file like :

<ion-content> <ion-card *ngFor="let data of abc"> //i want to filter the male data here {{data.name}} </ion-card> </ion-content>

Where will i place the if condition ?

Please help

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



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