#Bug when 2 way binding input type

3 messages · Page 1 of 1 (latest)

tribal wren
#
    <label *ngFor="let control of intakeIngangPartner.controls">
      <input
        [type]="control.type"
        [formControlName]="intakeIngangPartner.formControlName"
        [value]="control.value"
      />
      {{ control.label }}
    </label>

https://stackblitz.com/edit/angular-16-reactive-form-validation-bgyave

I want to use two way binding to set a input to a specific type (radio, text, etc) but when I use it I can select both inputs instead of the default behavior (select one) also the value seems to turn in a string value "true" instead of a boolean true.

finite sun
tribal wren
#

So it's impossible to use two way binding for the input type? So I should use something like ng switch to use the correct input type based on a component value?