I have this ruote configuration:
const routes: Routes = [
{ path: 'score', component: ScoreComponent }
];
when the component score is loaded I want to change the value of a variable in parent component.
The variable title is located in parent component template:
<div class="wrapper">
<app-header></app-header>
<app-menu [variablesForMenu]='variablesForMenu'></app-menu>
<div class="content-wrapper">
<section class="content-header">
<h1>
{{title}}
</h1>
</section>
<section class="content">
<router-outlet></router-outlet>
</section>
</div>
</div>
how can I do?
I would like to use EventEmitter but I do not know how
ngOnInit() { this.someService.em.next(true);}