From b6b1b8614fb71304e803c4772d3fea51dbdd821c Mon Sep 17 00:00:00 2001 From: Masum ULU <49063256+masumulu28@users.noreply.github.com> Date: Thu, 16 May 2024 16:50:32 +0300 Subject: [PATCH] Update title-strategy.service.ts --- .../core/src/lib/services/title-strategy.service.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/services/title-strategy.service.ts b/npm/ng-packs/packages/core/src/lib/services/title-strategy.service.ts index 2b00338ab68..af961794f87 100644 --- a/npm/ng-packs/packages/core/src/lib/services/title-strategy.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/title-strategy.service.ts @@ -1,7 +1,7 @@ import { Injectable, effect, inject } from '@angular/core'; +import { toSignal } from '@angular/core/rxjs-interop'; import { TitleStrategy, RouterStateSnapshot } from '@angular/router'; import { Title } from '@angular/platform-browser'; -import { toSignal } from '@angular/core/rxjs-interop'; import { LocalizationService } from './localization.service'; import { DISABLE_PROJECT_NAME } from '../tokens'; @@ -29,8 +29,6 @@ export class AbpTitleStrategy extends TitleStrategy { this.routerState = routerState; const title = this.buildTitle(routerState); - let localizedText = ''; - const projectName = this.localizationService.instant({ key: '::AppName', defaultValue: 'MyProjectName', @@ -39,8 +37,8 @@ export class AbpTitleStrategy extends TitleStrategy { if (!title) { return this.title.setTitle(projectName); } - localizedText = this.localizationService.instant({ key: title, defaultValue: title }); - + + let localizedText = this.localizationService.instant({ key: title, defaultValue: title }); if (!this.disableProjectName) { localizedText += ` | ${projectName}`; }