ERROR Error: No value accessor for form control with unspecified name attribute

https://stackoverflow.com/questions/46465891/what-is-ngdefaultcontrol-in-angular/46465959

添加 ngDefaultControl

<label *ngIf="'datepicker' === item.type && i > 0 && (item.label.indexOf('至') > -1 || item.label.indexOf('止') > -1)" style="20%; text-align: center;"
    [formControlName]="item.name" id="{{item.name}}" ngDefaultControl>
    <span>至:</span>
</label>
原文地址:https://www.cnblogs.com/xiluhua/p/15293924.html