0
我正在使用帶有角度的動態表單(https://angular.io/guide/dynamic-form),但是如何將此示例與md-input-container和angular material轉換?角度4 md輸入容器
<div [formGroup]="form">
<div [ngSwitch]="question.ControlType">
<input placeholder={{question.Label}} *ngSwitchCase="'textbox'" [formControlName]="question.Key" [id]="question.Key">
<select [id]="question.Key" *ngSwitchCase="'dropdown'" [formControlName]="question.Key">
<option *ngFor="let opt of question.Options" [value]="opt.OptionKey">{{opt.OptionValue}}</option>
</select>
<input *ngSwitchCase="'checkbox'" [type]="question.ControlType" [formControlName]="question.Key" [(ngModel)]="question.Value" (change)="question.Value = ckb.checked" #ckb>
</div>
請編輯您的問題,包括代碼 - 不要張貼作爲評論! – 0mpurdy