I have two components new-product and product-form.

In product-form the "form" variable is defined as follows:
<form [formGroup]="form" autocomplete="off" novalidate>

new-product has product-form nested in it as follows:

<product-form #form></product-form>
<button (click)="save(form)">Save</button>

However the form variable passed to save(form) is always "undefined". When 
I tested the same line of code for the button click in the product-form 
component it worked fine - a valid object was passed to save(form).

Given that product-form is working as expected and the variable #form is 
being correctly assigned I was under the impression that I could nest this 
in other forms as shown above and access the #form variable. Is this the 
correct expectation?
If so, any tips on what to consider would be appreciated.

Kind regards
Sean

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to