[js][database] Add ref property for consistency with web API

This commit is contained in:
Aleck Greenham 2017-04-22 09:27:37 +01:00
parent 03a52e03bc
commit 3d863ac636
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 - '/'