From 92c27b17755a4556199f48388c9e3af5d71fc3c2 Mon Sep 17 00:00:00 2001 From: Emmanuel Date: Thu, 15 Feb 2024 20:49:38 +0100 Subject: [PATCH] fix: update title --- public/src/app/app.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/src/app/app.component.ts b/public/src/app/app.component.ts index b1517a4..3e794a8 100644 --- a/public/src/app/app.component.ts +++ b/public/src/app/app.component.ts @@ -1,11 +1,12 @@ import { Component, inject } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { RouterLink, RouterOutlet } from '@angular/router'; +import { RouterLink, RouterOutlet, TitleStrategy } from '@angular/router'; import { Auth, GoogleAuthProvider, signInWithPopup } from '@angular/fire/auth'; import { MatToolbarModule } from '@angular/material/toolbar'; import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { environment } from '../environments/environment'; +import { Title } from '@angular/platform-browser'; @Component({ selector: 'cms-root', @@ -25,7 +26,9 @@ export class AppComponent { isLoggedIn: boolean | undefined; title = environment.title; private auth: Auth = inject(Auth); + private titleService: Title = inject(Title); constructor() { + this.titleService.setTitle(environment.title); this.auth.onAuthStateChanged((state) => { this.isLoggedIn = !!state?.email?.endsWith('@' + environment.emailDomain); });