submitForm(value: {
id: number; account: string;
realName: string;
sex: string;
email: string;
phoneNum: number;
telephoneNum: number;
isAdmin: string;
status: string;
address: string;
birthday: number;
}): void {
// tslint:disable-next-line:forin
for (const key in this.validateForm.controls) {
this.validateForm.controls[key].markAsDirty();
this.validateForm.controls[key].updateValueAndValidity();
}
console.log(value);
this.userService.save(value).subscribe(res => {
console.log(res)
this.nzMessageService.create('success', '添加员工成功')
this.router.navigate(['/home/user'])
})
}
此为提交数据方法,控制台打印为空