-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
Version info
Angular: angular/cli: ^1.4.2
Firebase: ^4.3.1
AngularFire: ^4.0.0-rc.2
How to reproduce these conditions
Steps to set up and reproduce
After upgrading my packages, the line: this.db.database.ref
throws the error: Property 'database' does not exist on type 'AngularFireDatabase'.
Have looked at https://github.com/angular/angularfire2/blob/master/docs/version-4-upgrade.md but when I change the line to this.db.ref
it's also not valid as: Property 'ref' does not exist on type 'AngularFireDatabase'.
import * as firebase from 'firebase/app';
import { AngularFireAuth } from 'angularfire2/auth';
import { AngularFireDatabase } from 'angularfire2/database';
@Injectable()
export class AuthService {
constructor(
private db: AngularFireDatabase,
private dbAuth: AngularFireAuth,
) {}
getUser(email) {
return this.db.database.ref(keys.database.tempUser)
.orderByChild('email')
.equalTo(email)
.limitToFirst(1)
.once('child_added', (data) => {
this.setLocalData(keys.localStorage.userIdTemp, data.key);
});
}
}
Debug output
Errors in the JavaScript console
Property 'database' does not exist on type 'AngularFireDatabase'.
Metadata
Metadata
Assignees
Labels
No labels