With native HTML input tags, I can do bindings on the type attribute like,
<input [type]="_field.type">
The input element would dynamically change according to the value of _field.type
However, if I have multiple components like this,
@Component({
selector: 'field-option[type=options]',
templateUrl: ''
})
And use it like,
<field-option [type]="_field.type">
It does not work, it does not bind.
I can however, get it to work with static value,
<field-option [type]="options">
I would like to know how to get this to work?
<field-option [attr.type]="_field.type">[type]="_field.type"this doesn't do anything to DOM (notypeattribute at all),[attr.type]="_field.type"does addstypeattributes, but doesn't renders the right component. Confusing.<field-option>component have@Input() type? Maybe you could just use selector'field-option'and use type as property...