【发布时间】:2019-10-22 10:04:28
【问题描述】:
以下代码显示了我的 component.ts 文件的重置功能。如何在不插入确认密码字段的情况下将数据输入到 firebase 数据库的“学生”集合中
ngOnInit() {
this.resetForm();
}
resetForm(form?:NgForm){
if(form !=null)
form.reset();
this.user={
Email:'',
Password:'',
IndexNumber:'',
ConfirmPassword:''
onSubmit(form:NgForm){
let data=form.value;
this.firestore.collection('student').add(data);
this.resetForm(form);
}
【问题讨论】:
标签: javascript angular firebase google-cloud-firestore