I'm unsure if such a query exists because I am not entirely certain of the terminology related to the concept I am seeking. Here's the scenario: I have a shared service with the following property:
// shared.service.ts
public showLoginForm: boolean = true;
In my app component, I utilize this property as shown below:
// app.component.ts
ngOnInit() {
this.showLoginForm = this.sharedSrv.showLoginForm;
}
Now, in my login component, I update the value of this property within the service without navigating away from the app component view:
// login.component.ts
login(f: ngForm){
...
this.sharedSrv.showLoginForm = false;
}
How can I pass the updated value of showLoginForm
back to the app component?