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

Uncaught (in promise): TypeError: Cannot read property 'length' of undefined

$
0
0

@rajbasilio wrote:

This is my typescript code

export class FailedPage {

  failedjobs: Array<any> = [];

  constructor(public navCtrl: NavController, 
              public navParams: NavParams, public jobfailList: JobActionsProvider) {
  }

  ionViewDidLoad() {
    console.log('FailedPage');
    // getting jobs from job-actions file and displaying
    this.jobfailList.getfailedjobList().then((data) => {
      console.log('displaying failed job list');
      for (let values of data) {
        this.failedjobs.push(values);
      }
    });
  }

}

I’m facing error as

Uncaught (in promise): TypeError: Cannot read property ‘length’ of undefined
TypeError: Cannot read property ‘length’ of undefined
at failed.ts:24

How can I fix this?

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>