-1
import { Injectable } from '@angular/core';
import { AngularFireAuth } from 'angularfire2/auth';
import { Observable } from 'rxjs';
import * as q from 'q';
@Injectable({
providedIn: 'root'
})
export class AuthService {
constructor(private afAuth: AngularFireAuth) { }
login(email: string, password: string) {
return new Promise((q.resolve, q.reject)) => {
this.afAuth.auth.signInWithEmailAndPassword(email, password)
.this(userData => q.resolve(userData),
err => q.reject(err))
});
}
getAuth() {
return this.afAuth.authState.map((auth => auth);
}
logout() {
this.afAuth.auth.signOut();
}
}
The following error message appears: Property 'map' does not exist on type 'Observable'. ts