如何解决因此,我一直在研究ionic4应用程序,但出现“错误TS2339”:类型“ AngularFireAuth”中不存在属性“ auth”
所以我正在开发这个离子应用程序,但是在try-catch块上的“ auth”上出现错误。可能是什么问题?
import { Injectable } from '@angular/core';
import { AngularFireAuth } from '@angular/fire/auth';
@Injectable({
providedIn: 'root'
})
export class FirebaseAuthService {
auth: any[];
constructor(private angularFireAuth: AngularFireAuth) { }
async registerWithEmailPassword(email,password) {
try {
const result = await this.angularFireAuth.***auth***.createuserWithEmailAndPassword(email,password);
await this.angularFireAuth.***auth***.currentUser.sendEmailVerification();
return result;
} catch (error) {
throw new Error(error);
}
}
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。