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

Ignore error in the display

$
0
0

@a7mdFo2ad wrote:

how to make my app don’t display the error if the respond i empty?
I’m getting a list of array
my ts code

this.Http.get(this.url ).subscribe((response) => {
        this.areas = response.json();
        console.log(response)
        loadArea2.dismiss()
      if(this.areas.length !> 0){
        console.log('empty')
        let noarea2 = this.AlertController.create({
          title: 'Sorry',
          subTitle: 'No Areas in Your City',
          buttons: ['OK']
        });
        noarea2.present();
      }
      });

i want to don’t display this error and display the alert message
36%20PM

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



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