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

Multiple for loop in template complained object not as array

$
0
0

@bobyui wrote:

Hi, I have this kind of data in my console.log :

  1. 0: Array(20)
  2. 0: {terms: {…}, xterms: {…},}
  3. 1: {terms: {…}, xterms: {…}}}
  4. 0: Array(120)
  5. 0: {terms: {…}, xterms: {…},}
  6. 1: {terms: {…}, xterms: {…}}}
  7. 0: Array(200)
  8. 0: {terms: {…}, xterms: {…},}
  9. 1: {terms: {…}, xterms: {…}}}

I stored the data into :

this.datalists = data;

and in my template file I managed to print out :

<ion-row class=“border-bottom” *ngFor=“let data of datalists; let i=index” >
{{data[i].name}}

{{dat.name}}

the 2nd ngfor failed with a message : ERROR Error: Cannot find a differ supporting object ‘[object Object]’ of type ‘object’. NgFor

is there anyway I can multi loop nested data? as its not possible as now

thank you

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>