Hi, can you please tell me how I can take a certain action (such as display a 'No Results' message) when a query service doesn't return any results in Ionic? I tried using the error event in the query's function, but it did not work. Thanks!
Hi, can you please tell me how I can take a certain action (such as display a 'No Results' message) when a query service doesn't return any results in Ionic? I tried using the error event in the query's function, but it did not work. Thanks!
Please check the length of the response data on the success event of that service.
preif (!success.data.length){
alert("No results");
}/pre
Thanks Sergiy, I knew it had to be something like that I was just confused on where exactly to add the code. It worked!