I have a scenario which is like that
I need a form wrapped around components
and HTML structure should like below:
<form #f="ngForm" (ngSubmit)="clickForm(f)">
<app-component-1></app-component-1>
<app-component-2></app-component-2>
<button type="submit">Submit</button>
</form>
And each component has specific set of inputs, and whole structure look like this:
<form #f="ngForm" (ngSubmit)="clickForm(f)">
<app-component-1>
<input type="text" name="name" #name="ngModel" ngModel required />
..so on upto 10 inputs
</app-component-1>
<app-component-2>
<input type="text" name="name2" #name2="ngModel" ngModel required />
..so on upto 10 inputs
</app-component-2>
<button type="submit">Submit</button>
</form>
But Form Validations not working. and Form status us always VALID. Any suggestion please?