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
1 changed files with 8 additions and 0 deletions

View File

@ -350,6 +350,14 @@ export default class Reference extends ReferenceBase {
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 - '/'