首页 > 解决方案 > “AngularFireAuth”类型上不存在属性“createUserWithEmailAndPassword”

问题描述

我收到一个错误,即“AngularFireAuth”类型上不存在属性“createUserWithEmailAndPassword”。你能告诉我我会做什么吗?

import { Injectable } from "@angular/core";
import { AngularFireAuth } from "@angular/fire/auth";

@Injectable({
  providedIn: "root",
})
export class AuthService {
  constructor(private auth: AngularFireAuth) {}

  signUp(email: string, password: string) {
    return this.auth.createUserWithEmailAndPassword(email, password);
  }
}

标签: typescriptfirebase-authenticationangularfire2angular9

解决方案


推荐阅读