From e3aeaec195a960315fef53e3095c7b659061f5f8 Mon Sep 17 00:00:00 2001 From: Quentin Date: Mon, 18 Dec 2023 18:50:36 +0100 Subject: [PATCH] [Angular] Angular DI: Using Inject instead of Constructor (review) --- .../src/main/webapp/app/app-page-title-strategy.ts.ejs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/generators/angular/templates/src/main/webapp/app/app-page-title-strategy.ts.ejs b/generators/angular/templates/src/main/webapp/app/app-page-title-strategy.ts.ejs index 16b6f9c4883e..e7de07de4c49 100644 --- a/generators/angular/templates/src/main/webapp/app/app-page-title-strategy.ts.ejs +++ b/generators/angular/templates/src/main/webapp/app/app-page-title-strategy.ts.ejs @@ -24,10 +24,9 @@ import { TranslateService } from "@ngx-translate/core"; @Injectable() export class AppPageTitleStrategy extends TitleStrategy { - <%_ if (enableTranslation) { _%>private translateService = inject(TranslateService);<%_ } _%> - constructor() { - super(); - } +<%_ if (enableTranslation) { _%> + private translateService = inject(TranslateService); +<%_ } _%> override updateTitle(routerState: RouterStateSnapshot): void { let pageTitle = this.buildTitle(routerState);