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

*ngFor is used yet html shows object,object

$
0
0

@RobertLow wrote:

Hi guys, need help why doesn’t my html show the data instead showing of [object,object]. I have used ngFor to load the array.

This is my html code,

    <ion-list>
        <ion-item *ngFor="let x of allItemRef$ | async;">
            {{x.anArray}}
        </ion-item>
    </ion-list>

this is ts code

allItemRef$: FirebaseListObservable<allItem[]>

  constructor(public navCtrl: NavController, public navParams: NavParams, public alertCtrl: AlertController, public database: AngularFireDatabase) {

   this.allItemRef$ = this.database.list('list');
  }

I looked up other tutorial, they uses ngFor it works what have I done wrong?

Thankyou.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70747

Trending Articles



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