Angularfire: rtdb Lists document sample still used $ref

Created on 7 Oct 2017  路  10Comments  路  Source: angular/angularfire

The documentation our rtdb lists here: rtdb lists

uses the $key property as follows:

<button (click)="updateItem(item.$key, updatetext.value)">Update</button>
<button (click)="deleteItem(item.$key)">Delete</button>

but in Ver 5 (according to the docs here version-5-upgrade indicates that you are:

Moving away from $key and $value

The sample provided on the first reference therefore does not work anymore with "angularfire2": "^5.0.0-rc.2",

Most helpful comment

@gerhardcit AngularFire2 is not mature, yet. It is in RC. Having solid documentation is required before we go final. We will be doing major documentation work in the near future. However, we are still trying to add features to the library like SSR support and async loading. Designing and implementing AngularFirestore was also a large task. It was a hard decision to deprecate version 4 of the RTDB, but we wanted to provide a similar API for Firestore and the RTDB.

What are you referring to when you say "large scalable systems"? I am always open to suggestions for improving the documentation so please respond with your thoughts.

I do suggest reading the official Firebase documentation. This library is a convenience for Angular developers and it's still the Firebase SDK under the hood.

@kleeb Thanks for the vote of confidence 馃槂

All 10 comments

Thanks, will address.

the topic is about $ref, not $key

looks like $ref is also missing, used to make a transaction calls like that

this.afd.object(path).$ref.transaction(...

any clue how to deal with it after upgrade to 5 ?

ok, I guess this will be

this.afd.object(path)
.snapshotChanges()
.subscribe( action => action.payload.ref.transaction(...));

i'm having the same issue with $key. has the sample app in rtdb/lists.md been updated yet?

@kleeb , yes, maybe some kind of explanation, but what essentially happened here is that RDDB went from BETA to MATURE with a lot of CORE changes suddenly thrown in which effect angularfire2 (/5) quite a lot.
The native Firebase SDK might be fairly mature, but AngularFire2 (ver 4) is essentially being thrown out the window. I don't think the Google guys did a great job in making life easier for angular users.
If anything, they really need to put better effort into the documentation if they want to drive out rapid changes.
Sometime they need to stop selling new features and make sire the current features (which they sold us yesterday) is still properly documented and supported. If not, they should have called it angularfireX and not Ver 5 of angularfire2.
@davideast , as much as we love your videos, we kind of dread reading your/(the) docs.
And Videos always only deals with the simple stuff.. documentation deals with the real issues we handle when trying to build large scalable systems.

Maybe thats why its RC. Anyway I still vote for @davideast playing with the core dev instead of writing great doc and samples. They will come up in time.

@gerhardcit AngularFire2 is not mature, yet. It is in RC. Having solid documentation is required before we go final. We will be doing major documentation work in the near future. However, we are still trying to add features to the library like SSR support and async loading. Designing and implementing AngularFirestore was also a large task. It was a hard decision to deprecate version 4 of the RTDB, but we wanted to provide a similar API for Firestore and the RTDB.

What are you referring to when you say "large scalable systems"? I am always open to suggestions for improving the documentation so please respond with your thoughts.

I do suggest reading the official Firebase documentation. This library is a convenience for Angular developers and it's still the Firebase SDK under the hood.

@kleeb Thanks for the vote of confidence 馃槂

I am also closing this issue as we have fixed this in the documentation.

@kleeb : It works like this.
this.afd.object(path).query.ref.transaction(....);

Was this page helpful?
0 / 5 - 0 ratings