I have plunker demo here:
http://plnkr.co/edit/LX1m2zIpxe3M1Zs5F6zA?p=preview
which has a address component nested in parent component.
How can i apply form validations to the address component and get the values of the address component on form submit? Somebody guide me to get the form values of nested components.
constructor(fb: FormBuilder) {
this.myForm = fb.group({
'name': ['', Validators.required],
'Phone': ['', Validators.required]
});
}
How do I inject the values of the address component in the parent? What is the best practice for doing it because i am new to doing forms in nested components. Please help.
requiredattribute on the address input field? - Sonu Kapoor