提供 formControlName 属性的 Angular2 W3C 验证错误
Angular2 W3C validation error for providing formControlName attribute
在一个 Angular2 应用程序中,我在表单组的输入字段中使用了 formControlName 属性。
示例:
input formControlName="Searchbycombo"
class="customcombocontrol" type="text" name="Searchbycombo" id="ctry"
但是当我尝试验证页面时,W3c 验证器提供了一些错误
"Attribute formcontrolname not allowed on element input at this
point."
我已经经历过这个url但是运气不好https://angular.io/docs/ts/latest/guide/template-syntax.html#!#other-bindings
知道如何解决这个问题。
您好,今天我收到了 Angular 团队的回复,他们提到使用以下方式
[formControlName]="'Searchbycombo'"
并且在渲染后它不再在 w3c 验证器上给出任何错误。
感谢大家的支持和帮助
在一个 Angular2 应用程序中,我在表单组的输入字段中使用了 formControlName 属性。
示例:
input formControlName="Searchbycombo"
class="customcombocontrol" type="text" name="Searchbycombo" id="ctry"
但是当我尝试验证页面时,W3c 验证器提供了一些错误
"Attribute formcontrolname not allowed on element input at this point."
我已经经历过这个url但是运气不好https://angular.io/docs/ts/latest/guide/template-syntax.html#!#other-bindings
知道如何解决这个问题。
您好,今天我收到了 Angular 团队的回复,他们提到使用以下方式
[formControlName]="'Searchbycombo'"
并且在渲染后它不再在 w3c 验证器上给出任何错误。
感谢大家的支持和帮助