2
0
mirror of synced 2025-01-12 15:14:39 +00:00

Merge pull request #64 from greena13/reference_ref

[js][database] Add ref property for consistency with web API
This commit is contained in:
Michael Diarmid 2017-04-22 10:01:47 +01:00 committed by GitHub
commit 898217ff6c

View File

@ -350,6 +350,14 @@ export default class Reference extends ReferenceBase {
return new Reference(this.database, this.path.substring(0, this.path.lastIndexOf('/'))); return new Reference(this.database, this.path.substring(0, this.path.lastIndexOf('/')));
} }
/**
* A reference to itself
* @type {!Reference}
* {@link https://firebase.google.com/docs/reference/js/firebase.database.Reference#ref}
*/
get ref(): Reference {
return this;
}
/** /**
* Returns a ref to the root of db - '/' * Returns a ref to the root of db - '/'