2017-01-23 61 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驗證任何錯誤渲染。

感謝所有的支持和幫助