I'm building a dynamic form using reactive controls and I need to be able to show the data instead of using it in an Input control. I basically have a switch that toggles the form between input based and read-only (for printing). However, I can't use label or span with the formControlName tag. Thus, I'm doing a hack to traverse the form group object and it seems like there should be an easier way. For example, to print the title property inside of a FormArray I use:
<div *ngIf="isPrinting">{{group.controls[config.fieldName].value[i].title}}</div>
It would be so much easier if I could do
<span *ngIf="isPrinting" formControlName="title"></span>
or something similar. Is this possible?
Thanks.