I have 2 components, a parent component and a child component. The parent component contains the following:
<form (ngSubmit)="saveWebsite();" #adminForm="ngForm">
<input type="text" name="WebName" [(ngModel)]="milestone.WebName" class="form-control" required/>
<app-documents [documents]="caseData.CaseWebsiteDocuments" [caseId]="caseId" (fileEvent)="showToast($event)"
(documentsEvent)="documentsEvent($event)"></app-documents>
<button type="submit" class="btn btn-success pull-right" *ngIf="caseId">Save</button>
</form>
The child component contains the following:
<input type="text" [(ngModel)]="doc.FriendlyName" name="friendlyName" class="form-control" required/>
If I put all inputs in the parent component, the validation works for everything. I am trying to check the dirty status. Right now, if I make changes on the Parent, the dirty status is set to true, but if I make a change on the child, the dirty status does not change. How can I get validation to work in template driven nested controls?