Refactored title service
All checks were successful
Gitea/swiss-client/pipeline/head This commit looks good

This commit is contained in:
2025-08-13 23:40:36 +02:00
parent f88cd94316
commit 26c0c1a2da
16 changed files with 88 additions and 94 deletions

View File

@@ -1,4 +1,4 @@
import {Component, OnInit} from '@angular/core';
import {Component, OnDestroy, OnInit} from '@angular/core';
import {MatCard, MatCardContent} from "@angular/material/card";
import {TournamentService} from "../../service/tournament.service";
import {ActivatedRoute, Router} from "@angular/router";
@@ -10,7 +10,7 @@ import {Group} from "../../model/group";
import {MatFormField} from "@angular/material/form-field";
import {MatInput} from "@angular/material/input";
import {ReactiveFormsModule} from "@angular/forms";
import {TitleService} from "../../service/title.service";
import {HeaderService} from "../../service/header.service";
@Component({
selector: 'app-match-sheets',
@@ -29,7 +29,7 @@ import {TitleService} from "../../service/title.service";
templateUrl: './match-sheets.component.html',
styleUrl: './match-sheets.component.scss'
})
export class MatchSheetsComponent implements OnInit {
export class MatchSheetsComponent implements OnInit, OnDestroy {
tournament: Tournament;
group: Group;
@@ -39,7 +39,7 @@ export class MatchSheetsComponent implements OnInit {
private tournamentService: TournamentService,
private route: ActivatedRoute,
private router: Router,
private titleService: TitleService
private headerService: HeaderService
) {
}
@@ -55,7 +55,7 @@ export class MatchSheetsComponent implements OnInit {
if (round.id == roundId) {
this.group = group;
this.round = round;
this.titleService.setTitle(`Wedstrijdbriefjes ${this.group.name} ${this.round.name}`);
this.headerService.setTitle(`Wedstrijdbriefjes ${this.group.name} ${this.round.name}`);
return;
}
}
@@ -64,4 +64,8 @@ export class MatchSheetsComponent implements OnInit {
});
}
ngOnDestroy() {
this.headerService.clearTitle()
}
}