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

How to show an message if product is not found after searh

$
0
0

@flycoders_sourav wrote:

How to show an message if product is not found after searh
below my code

getItems(ev) {
  // Reset items back to all of the items
  this.initializeItems();
console.log(ev);
  // set val to the value of the ev target
  var val = ev.target.value;
  console.log(val)
  // if the value is an empty string don't filter the items
  if (val && val.trim() != '') {
    this.serarchProduct = this.serarchProduct.filter((item) => {
      return (item.product_name.toLowerCase().indexOf(val.toLowerCase()) > -1);
    })
  }
}

Please help me out
any help would be highly appreciated
Thanks

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70910

Trending Articles



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