|
@ -6,8 +6,7 @@ import { RouterStateSnapshot, TitleStrategy } from '@angular/router'; |
|
|
export class PageTitleStrategy extends TitleStrategy { |
|
|
export class PageTitleStrategy extends TitleStrategy { |
|
|
private static readonly DEFAULT_TITLE = |
|
|
private static readonly DEFAULT_TITLE = |
|
|
'Ghostfolio – Open Source Wealth Management Software'; |
|
|
'Ghostfolio – Open Source Wealth Management Software'; |
|
|
private static readonly DEFAULT_TITLE_SHORT = |
|
|
private static readonly DEFAULT_TITLE_SHORT = 'Ghostfolio'; |
|
|
'Ghostfolio'; |
|
|
|
|
|
|
|
|
|
|
|
public constructor(private readonly title: Title) { |
|
|
public constructor(private readonly title: Title) { |
|
|
super(); |
|
|
super(); |
|
@ -17,7 +16,9 @@ export class PageTitleStrategy extends TitleStrategy { |
|
|
const title = this.buildTitle(routerState); |
|
|
const title = this.buildTitle(routerState); |
|
|
|
|
|
|
|
|
if (title) { |
|
|
if (title) { |
|
|
this.title.setTitle(`${title} – ${PageTitleStrategy.DEFAULT_TITLE_SHORT}`); |
|
|
this.title.setTitle( |
|
|
|
|
|
`${title} – ${PageTitleStrategy.DEFAULT_TITLE_SHORT}` |
|
|
|
|
|
); |
|
|
} else { |
|
|
} else { |
|
|
this.title.setTitle(`${PageTitleStrategy.DEFAULT_TITLE}`); |
|
|
this.title.setTitle(`${PageTitleStrategy.DEFAULT_TITLE}`); |
|
|
} |
|
|
} |
|
|