角度验证表格

问题描述 投票:0回答:1

ERROR TypeError: Cannot read properties of undefined (reading 'hasError')
    at template (user-profile.component.html:18:41)

我可以尝试很多想法,但我无法解决这些问题,请帮助我

angular angular-forms
1个回答
1
投票

表单控件上没有 hasError 属性。这就是问题所在。您正在寻找的属性称为错误。查看 https://angular.io/guide/form-validation

© www.soinside.com 2019 - 2024. All rights reserved.