简体   繁体   中英

Angular5: Unable to get firebase object

I just created a sample firebase object in firebase console, and I want to get the object in my typescrip. I followed the steps as in http://www.dotnetmob.com/angular-5-tutorial/angular-5-crud-operations-with-firebase/ . But no luck. can anyone help me with this please?

Here is my object: 在此处输入图片说明

constructor(private db :AngularFireDatabase) {
    let item:any = db.list('OAuth');
    console.log("_____________", item);
}

What I'm missing. I'm getting the output in browser console like this:

在此处输入图片说明

您可以通过item.stateChanges(["child_added"]).subscribe((data) => { var items = data.payload.val(); })

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM