Ng-zorro-antd: 表单重置未生效?

Created on 21 Aug 2017  ·  7Comments  ·  Source: NG-ZORRO/ng-zorro-antd

I'm submitting a...


[X] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Support request => Please do not submit support request here

Current behavior


表单重置问题,form.reset()后表单dirty仍为true。使用input未出现该情况
image

Bug 🤚 Blocked By @angular

All 7 comments

bug confirm, thanks.

private resetForm(forms:NgForm[]) {
forms.forEach((form: NgForm) => {
if (form.dirty) {
for (let l in form.controls) {
form.controls[l].markAsPristine();
form.controls[l].markAsUntouched();
}
}
})
}
u can use similar function to do your work

Can't bind to 'formGroup' since it isn't a known property of 'form'. ("