<!-- #docregion -->
<div [ngFormModel]="form">
  <label [attr.for]="question.key">{{question.label}}</label>

  <div [ngSwitch]="question.controlType">

    <input *ngSwitchWhen="'textbox'" [ngControl]="question.key"
            [id]="question.key" [type]="question.type">

    <select [id]="question.key" *ngSwitchWhen="'dropdown'" [ngControl]="question.key">
      <option *ngFor="let opt of question.options" [value]="opt.key">{{opt.value}}</option>
    </select>

  </div>

  <div class="errorMessage" *ngIf="!isValid">{{question.label}} is required</div>
</div>
