Show Message if results are empty


I have a search form for products. I would like to make sure that it shows me a message when the list is empty, when there is no result.

My code :

<form ng-controller="productCtrl" name="searchForm" ng-submit="searchProduct()" ng-disabled="searchForm.$invalid">
    <input placeholder="Search" type="text" ng-model="" required>
    <ion-item ng-repeat="product in list track by $index">{{ }}</ion-item>

thank you :slight_smile:


Hi Tsila,

You can use ng-if
Can’t test at the moment but something like this

< ng-if="list" ion-item ng-repeat="product in list track by $index">{{ }}</ion-item>
< ng-if="list == false" ion-item>No product(s) found</ion-item>