Angular 2 has a 'safe navigation operator' that allows template references to potentially undefined child properties in your components.
Is there any way to use this with dynamic properties and bracket notation? e.g.,
<input [type]="text" [ngModel]="formValues?[control]">
Where control is another variable from my component telling the template which form value to use and formValues is loaded async so could potentially be null.
formValues?[control]is supposed to REALLY do or contains. So hard to say if it could work. Something likesomeObj?.somePropertyI do understand what is doing exactly. Hmm, might *ngIf work for you in this case, to check that there is value before rendering?<input *ngIf="formValues[control]" ... />as said, not really knowing what is going on with that, hard to help further. - AJT82