In Angular you can add attributes to inputs and make them optional using attr: <input [type]="text" [attr.id]="id"> But how do you make a form control optional? I want something like this: <input [type]="text" [attr.formControl]="someControl"> Where the formControl will not be set if someControl is undefined or null? Continue reading...