KarolDepka
KarolDepka

Reputation: 8628

Given a FirebaseListObservable object, how to get its path?

Given an TASKS: FirebaseListObservable<any[]>; object, how can I get the path where it points to?

Tried .$ref, but I just see a bunch of obfuscated fields (in Chrome debugger).

Upvotes: 1

Views: 89

Answers (1)

cartant
cartant

Reputation: 58430

It has a bunch of obfuscated fields, but the function you want is implemented; it's on the prototype. You need to call toString:

var url = TASKS.$ref.toString();

Upvotes: 2

Related Questions