3
我知道如何使用电子邮件和密码创建用户,但我怎样才能创建他的名字和姓? 这是我的代码形式的电子邮件地址和密码AngularFire2如何创建用户(名称,姓氏,电子邮件,密码)
registerUser(formData) {
if(formData.valid) {
this.af.auth.createUser({
email: formData.value.email,
password: formData.value.password,
}).then((success) => {
this.routing.navigateByUrl('/login');
}).catch((error) => {
console.log(error);
})
}
}
我不能只是写
registerUser(formData) {
if(formData.valid) {
this.af.auth.createUser({
email: formData.value.email,
password: formData.value.password,
name: formData.value.name, // this is error :(
surname: formData.value.surname, // this is error :(
}).then((success) => {
this.routing.navigateByUrl('/login');
}).catch((error) => {
console.log(error);
})
}
}
任何想法?
非常感谢你:) – qwerty1234567