Skip to content

Commit a262a5c

Browse files
jamesdanielsdavideast
authored andcommitted
Adding AngularFireDatabase.database
Adding AngularFireDatabase.database to be consistent with the AngularFireAuth API.
1 parent 980c447 commit a262a5c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/database/database.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ import * as utils from '../utils';
1212
@Injectable()
1313
export class AngularFireDatabase {
1414

15-
constructor(public app: FirebaseApp) {}
15+
/**
16+
* Firebase Database instance
17+
*/
18+
database: firebase.database.Database;
19+
20+
constructor(public app: FirebaseApp) {
21+
this.database = app.database();
22+
}
1623

1724
list(pathOrRef: PathReference, opts?:FirebaseListFactoryOpts):FirebaseListObservable<any[]> {
1825
const ref = utils.getRef(this.app, pathOrRef);

0 commit comments

Comments
 (0)