I have a form in my Parent Component
which has a hidden input for new password and an edit password button.
In the Child Component
by clicking on the edit password button, a matdialog
will be loaded and to enter enter new password and save. Since this is in a different form I should pass it to the Parent Component
.
Can anyone help for this child to parent communication?
Child Component
@Output() editedPassword = new EventEmitter<String>();
saveButtonClick(){
this.editedPassword.emit(this.myform.get('password').value);
}
How can I pass this value to the parent component?