在angular2表单(ngForm)中使用wijmo控件,无法使用ngControl,其它非wijmo的控件就可以,请问该如何使用?
报错如下:
EXCEPTION: No value accessor for 'inputnb'
配置:
<form #f ="ngForm">
<ul>
<li>姓名:<input type="text" ngControl="name" #name="ngForm" [(ngModel)]="data.name"></li>
<li>{{name.value}}</li>
<li>
姓别:
<select ngControl="gender" [(ngModel)]="data.gender">
<option value="Male">男</option>
<option value="Female">女</option>
</select>
</li>
<li>地址:<input type="text" ngControl="address" [(ngModel)]="data.address"></li>
<li>电话:<input type="text" ngControl="telephone" [(ngModel)]="data.telephone"></li>
<li>已婚:<input type="checkbox" ngControl="marriage" [(ngModel)]="data.marriage"></li>
</ul>
<wj-input-number ngControl="inputnb" #inputnb="ngForm" [(value)]="data.passengers" [format]="'n'" [step]=".5"> </wj-input-number>
</form>
|
|