嗨,我m using Angular 6 reactive form, and I
使用浮动标签HTML,仅当字段为ng有效时,标签才会向上显示。
//我的控制
<div class="col-md-6 col-xs-6">
<div class="floating-label">
<select class="floating-select" value="" formControlName="systemId" [disabled]="loginSysId!=='Admin'" #txtSysId disabled>
<option [ngValue]="null">--Select--</option>
<option *ngFor="let val of systemId" [ngValue]="val">{{val}}</option>
</select>
<span class="highlight"></span>
<label>System Id</label>
</div>
</div>
如果我m selecting the options formed from systemId variable ng-valid is applied to control, but when I
选择--select--仍保持ng-invalid。请帮助我。