I have an angular form with fields such as first name, last name, email, etc. I am subscribing to the values being changed and would like to access and show the values in the html as sort of a review/confirm and submit feature.
this.addEmployeeForm.valueChanges.subscribe(
values => {
console.log("VALUES", values);
if(values.hasOwnProperty('firstName')){
console.log(values.firstName)
this.defaultData.push(values.firstName);
}
}
)
I was hoping to have these values in the default data, then loop through the default data array. The problem I am having is, since it is a subscription, it pushes every single key change into the array. Is there nay way I can access the final full name?