I have below code
<ion-card >
<ion-card-content>
<ion-chip *ngFor="let skill of contact.skills | split">
<ion-label>{{skill}}</ion-label>
</ion-chip>
</ion-card-content>
</ion-card>
then I want to hide the card if there is no skills, so I changed it to
<ion-card [hidden]="(contact.skills | split).length == 0">
<ion-card-content>
<ion-chip *ngFor="let skill of contact.skills | split">
<ion-label>{{skill}}</ion-label>
</ion-chip>
</ion-card-content>
</ion-card>
and it's working fine, but the problem is value is going to split pipe twice, then how can I define a variable and using pipe once?
I tried below but not working
<ion-card #skills="contact.skills | split" [hidden]="skills.length == 0">
<ion-card-content>
<ion-chip *ngFor="let skill of skills">
<ion-label>{{skill}}</ion-label>
</ion-chip>
</ion-card-content>
</ion-card>