I'm doing some base classes to do common things and then call overridden methods in the child classes.
In the code bellow, I need to call this.doSomethingElse only after the user is update by user service.
this is in the base class:
public onSubmit() {
this.beforeSubmit();
this.submitForm().subscribe(() => {
this.afterSubmit();
});
}
this is in the child class:
public submitForm(): Observable<User> {
this.userServices.update(formValues).subscribe((user: User) => {
this.someChildAction();
return ??? ?
});
return ????
}
I'm not sure what to code in the ???? lines.
doSomethingElsethat child class does not know. I made some update in the question.