2017-01-23 60 views
1

在其中一个Angular2应用程序中,我在formgroup的输入字段中使用了formControlName属性。提供formControlName属性的Angular2 W3C验证错误

例子:
input formControlName="Searchbycombo" class="customcombocontrol" type="text" name="Searchbycombo" id="ctry"

但是,当我尝试验证的页面,W3C验证提供了一些错误

“属性formcontrolname不会在这个 点允许在元素的输入。”

我已经通过这个网址,但没有运气https://angular.io/docs/ts/latest/guide/template-syntax.html#!#other-bindings

任何想法如何解决同去。

+0

显然这不是'input'元素的正式有效属性。 – jonrsharpe

+0

有效输入属性列表:https://w3c.github.io/html/sec-forms.html#the-input-element – BSMP

+0

您的代码在哪里? – developer033

回答

4

今天您好我已经收到了回信形式角队,他们提到使用以下方式

[formControlName] =“‘Searchbycombo’”

其不再给后上的W3C验证任何错误渲染。

感谢所有的支持和帮助