`$ref` no longer available, can't do `onDisconnect` calls anymore.
See original GitHub issueVersion info
Angular: 4.4.6
Firebase: 4.6.0
AngularFire: 5.0.0-rc.3
Other (e.g. Ionic/Cordova, Node, browser, operating system):
How to reproduce these conditions
Prior to upgrading to v5, the following code worked.
let donuts = this.db.object(`DONUTS`);
donuts.$ref.onDisconnect().set(false);
Now it no longer works as I can’t access the $ref
property from the result of the call to this.db.object()
. Any ideas on how I might regain onDisconnect
functionality? I didn’t see this change in the migration docs, so this caught me off guard.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Complying with the Telemarketing Sales Rule
If a seller or telemarketer “upsells” a consumer during an unsolicited call initiated by the consumer, the upsell is covered by the TSR....
Read more >Release notes for Amazon Connect
To help you keep track of the ongoing updates and improvements to Amazon Connect, we publish release notices that describe recent changes.
Read more >Understanding and Handling Connection Lifetime Events ...
This article provides an overview of the SignalR connection, reconnection, and disconnection events that you can handle, and timeout and ...
Read more >If you're changing phones, here's how to disconnect your ...
The best thing to do is to do a factory reset on your old phone when you change. But if you don't, certain...
Read more >Reassigned Numbers Database
Callers can use the database to determine whether a telephone number may have been reassigned so they can avoid calling consumers who do...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey @aaronfrost! The query/ref is available on the
AngularFireObject
service, it’s just called query now.Thanks for flagging this, we’ll update our migration guide to indicate this.
I agree with @jaufgang. The ref should be exposed differently, and that the proposed “solution” is more of a workaround, than a solution. Having to snapshotChanges and then subscribe, so that I can simply get a pointer to the ref is a lot of hoops that were’t necessary before. Since the API is being rev’d, this should be considered.