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

TypeError: Cannot read property '0' of undefined TypeError: Cannot read property '0' of undefined

$
0
0

@Tubiss wrote:

public product: any;

loadProducts(){
  this.myProvider.load()
  .then(data => {
    console.log(data);
    this.product= data;
   });
}

this.eventDate=new Date(this.product[0].start_time); //when ı write this code its givin error like this TypeError: Cannot read property ‘0’ of undefined TypeError: Cannot read property ‘0’ of undefined

so plaese help me how can ı use peroducts something like product[0].

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70914

Trending Articles



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