Skip to content

Commit

Permalink
Update title-strategy.service.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
masum-ulu authored May 16, 2024
1 parent 71d4349 commit b6b1b86
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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',
Expand All @@ -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}`;
}
Expand Down

0 comments on commit b6b1b86

Please sign in to comment.