Hi
My html file has below code
<ion-content padding>
<ion-list>
<button ion-item detail-push *ngFor="#resource of resources" (click)="DisplayDetails($event,resource)">
<ion-thumbnail item-left>
<img [src]="resource.imageUrl">
</ion-thumbnail>
<h1>{{resource.name}}</h1>
<p> <b> {{resource.skill.name}} </b> • {{resource.experience}} Years</p>
<ion-icon name="arrow-forward" item-right></ion-icon>
</button>
</ion-list>
</ion-content>
<ion-content>
<ion-item text-wrap [hidden] = "resources.length > 0">
<p>No resource found for selected location. Sorry for the inconvenience caused. Kindly search for other locations.</p>
</ion-item>
</ion-content>
Not sure why for resources.length , it throws error as below
Uncaught (in promise): EXCEPTION: TypeError: Cannot read property ‘length’ of undefined in [resources.length > 0
Please help.