parent
9f2a49a1c7
commit
eee1f1c722
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added page titles
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Improved the performance of data provider requests by introducing a maximum number of symbols per request (chunk size)
|
- Improved the performance of data provider requests by introducing a maximum number of symbols per request (chunk size)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes, TitleStrategy } from '@angular/router';
|
||||||
|
import { PageTitleStrategy } from '@ghostfolio/client/services/page-title.strategy';
|
||||||
|
|
||||||
import { ModulePreloadService } from './core/module-preload.service';
|
import { ModulePreloadService } from './core/module-preload.service';
|
||||||
|
|
||||||
@ -234,7 +235,10 @@ const routes: Routes = [
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
providers: [ModulePreloadService],
|
providers: [
|
||||||
|
ModulePreloadService,
|
||||||
|
{ provide: TitleStrategy, useClass: PageTitleStrategy }
|
||||||
|
],
|
||||||
exports: [RouterModule]
|
exports: [RouterModule]
|
||||||
})
|
})
|
||||||
export class AppRoutingModule {}
|
export class AppRoutingModule {}
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { AboutPageComponent } from './about-page.component';
|
import { AboutPageComponent } from './about-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: AboutPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: AboutPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'About'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { ChangelogPageComponent } from './changelog-page.component';
|
import { ChangelogPageComponent } from './changelog-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: ChangelogPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: ChangelogPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'Changelog & License'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { PrivacyPolicyPageComponent } from './privacy-policy-page.component';
|
import { PrivacyPolicyPageComponent } from './privacy-policy-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: PrivacyPolicyPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: PrivacyPolicyPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'Privacy Policy'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { AccountPageComponent } from './account-page.component';
|
import { AccountPageComponent } from './account-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: AccountPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: AccountPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'My Ghostfolio'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { AccountsPageComponent } from './accounts-page.component';
|
import { AccountsPageComponent } from './accounts-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: AccountsPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: AccountsPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'Accounts'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -10,8 +10,6 @@ import { AdminPageComponent } from './admin-page.component';
|
|||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
|
||||||
component: AdminPageComponent,
|
|
||||||
canActivate: [AuthGuard],
|
canActivate: [AuthGuard],
|
||||||
children: [
|
children: [
|
||||||
{ path: '', redirectTo: 'overview', pathMatch: 'full' },
|
{ path: '', redirectTo: 'overview', pathMatch: 'full' },
|
||||||
@ -19,7 +17,10 @@ const routes: Routes = [
|
|||||||
{ path: 'market-data', component: AdminMarketDataComponent },
|
{ path: 'market-data', component: AdminMarketDataComponent },
|
||||||
{ path: 'overview', component: AdminOverviewComponent },
|
{ path: 'overview', component: AdminOverviewComponent },
|
||||||
{ path: 'users', component: AdminUsersComponent }
|
{ path: 'users', component: AdminUsersComponent }
|
||||||
]
|
],
|
||||||
|
component: AdminPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'Admin Control'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@ import { RouterModule, Routes } from '@angular/router';
|
|||||||
import { AuthPageComponent } from './auth-page.component';
|
import { AuthPageComponent } from './auth-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: AuthPageComponent },
|
{ component: AuthPageComponent, path: '' },
|
||||||
{ path: ':jwt', component: AuthPageComponent }
|
{ component: AuthPageComponent, path: ':jwt' }
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -6,9 +6,10 @@ import { HalloGhostfolioPageComponent } from './hallo-ghostfolio-page.component'
|
|||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
canActivate: [AuthGuard],
|
||||||
component: HalloGhostfolioPageComponent,
|
component: HalloGhostfolioPageComponent,
|
||||||
canActivate: [AuthGuard]
|
path: '',
|
||||||
|
title: 'Hallo Ghostfolio'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -6,9 +6,10 @@ import { HelloGhostfolioPageComponent } from './hello-ghostfolio-page.component'
|
|||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
canActivate: [AuthGuard],
|
||||||
component: HelloGhostfolioPageComponent,
|
component: HelloGhostfolioPageComponent,
|
||||||
canActivate: [AuthGuard]
|
path: '',
|
||||||
|
title: 'Hello Ghostfolio'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -6,9 +6,10 @@ import { FirstMonthsInOpenSourcePageComponent } from './first-months-in-open-sou
|
|||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
canActivate: [AuthGuard],
|
||||||
component: FirstMonthsInOpenSourcePageComponent,
|
component: FirstMonthsInOpenSourcePageComponent,
|
||||||
canActivate: [AuthGuard]
|
path: '',
|
||||||
|
title: 'First months in Open Source'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -6,9 +6,10 @@ import { GhostfolioMeetsInternetIdentityPageComponent } from './ghostfolio-meets
|
|||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
canActivate: [AuthGuard],
|
||||||
component: GhostfolioMeetsInternetIdentityPageComponent,
|
component: GhostfolioMeetsInternetIdentityPageComponent,
|
||||||
canActivate: [AuthGuard]
|
path: '',
|
||||||
|
title: 'Ghostfolio meets Internet Identity'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -6,9 +6,10 @@ import { HowDoIGetMyFinancesInOrderPageComponent } from './how-do-i-get-my-finan
|
|||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
canActivate: [AuthGuard],
|
||||||
component: HowDoIGetMyFinancesInOrderPageComponent,
|
component: HowDoIGetMyFinancesInOrderPageComponent,
|
||||||
canActivate: [AuthGuard]
|
path: '',
|
||||||
|
title: 'How do I get my finances in order?'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { BlogPageComponent } from './blog-page.component';
|
import { BlogPageComponent } from './blog-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: BlogPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: BlogPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'Blog'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { FaqPageComponent } from './faq-page.component';
|
import { FaqPageComponent } from './faq-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: FaqPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: FaqPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'FAQ'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { FeaturesPageComponent } from './features-page.component';
|
import { FeaturesPageComponent } from './features-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: FeaturesPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: FeaturesPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'Features'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -10,8 +10,6 @@ import { HomePageComponent } from './home-page.component';
|
|||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
|
||||||
component: HomePageComponent,
|
|
||||||
canActivate: [AuthGuard],
|
canActivate: [AuthGuard],
|
||||||
children: [
|
children: [
|
||||||
{ path: '', redirectTo: 'overview', pathMatch: 'full' },
|
{ path: '', redirectTo: 'overview', pathMatch: 'full' },
|
||||||
@ -19,7 +17,10 @@ const routes: Routes = [
|
|||||||
{ path: 'holdings', component: HomeHoldingsComponent },
|
{ path: 'holdings', component: HomeHoldingsComponent },
|
||||||
{ path: 'summary', component: HomeSummaryComponent },
|
{ path: 'summary', component: HomeSummaryComponent },
|
||||||
{ path: 'market', component: HomeMarketComponent }
|
{ path: 'market', component: HomeMarketComponent }
|
||||||
]
|
],
|
||||||
|
component: HomePageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'Overview'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { MarketsPageComponent } from './markets-page.component';
|
import { MarketsPageComponent } from './markets-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: MarketsPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: MarketsPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'Markets'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { AllocationsPageComponent } from './allocations-page.component';
|
import { AllocationsPageComponent } from './allocations-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: AllocationsPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: AllocationsPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'Allocations'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { AnalysisPageComponent } from './analysis-page.component';
|
import { AnalysisPageComponent } from './analysis-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: AnalysisPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: AnalysisPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'Analysis'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { FirePageComponent } from './fire-page.component';
|
import { FirePageComponent } from './fire-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: FirePageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: FirePageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'FIRE'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { HoldingsPageComponent } from './holdings-page.component';
|
import { HoldingsPageComponent } from './holdings-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: HoldingsPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: HoldingsPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'Holdings'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { PortfolioPageComponent } from './portfolio-page.component';
|
import { PortfolioPageComponent } from './portfolio-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: PortfolioPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: PortfolioPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'Portfolio'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { ReportPageComponent } from './report-page.component';
|
import { ReportPageComponent } from './report-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: ReportPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: ReportPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'X-ray'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { TransactionsPageComponent } from './transactions-page.component';
|
import { TransactionsPageComponent } from './transactions-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: TransactionsPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: TransactionsPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'Activities'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { PricingPageComponent } from './pricing-page.component';
|
import { PricingPageComponent } from './pricing-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: PricingPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: PricingPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'Pricing'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { PublicPageComponent } from './public-page.component';
|
import { PublicPageComponent } from './public-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: ':id', component: PublicPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: PublicPageComponent,
|
||||||
|
path: ':id',
|
||||||
|
title: 'Portfolio'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { RegisterPageComponent } from './register-page.component';
|
import { RegisterPageComponent } from './register-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: RegisterPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: RegisterPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'Registration'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -5,7 +5,12 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|||||||
import { ResourcesPageComponent } from './resources-page.component';
|
import { ResourcesPageComponent } from './resources-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: ResourcesPageComponent, canActivate: [AuthGuard] }
|
{
|
||||||
|
canActivate: [AuthGuard],
|
||||||
|
component: ResourcesPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'Resources'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
|
|||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
import { WebauthnPageComponent } from '@ghostfolio/client/pages/webauthn/webauthn-page.component';
|
import { WebauthnPageComponent } from '@ghostfolio/client/pages/webauthn/webauthn-page.component';
|
||||||
|
|
||||||
const routes: Routes = [{ path: '', component: WebauthnPageComponent }];
|
const routes: Routes = [
|
||||||
|
{ component: WebauthnPageComponent, path: '', title: 'Login' }
|
||||||
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [RouterModule.forChild(routes)],
|
imports: [RouterModule.forChild(routes)],
|
||||||
|
@ -8,14 +8,15 @@ import { ZenPageComponent } from './zen-page.component';
|
|||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
|
||||||
component: ZenPageComponent,
|
|
||||||
canActivate: [AuthGuard],
|
canActivate: [AuthGuard],
|
||||||
children: [
|
children: [
|
||||||
{ path: '', redirectTo: 'overview', pathMatch: 'full' },
|
{ path: '', redirectTo: 'overview', pathMatch: 'full' },
|
||||||
{ path: 'overview', component: HomeOverviewComponent },
|
{ path: 'overview', component: HomeOverviewComponent },
|
||||||
{ path: 'holdings', component: HomeHoldingsComponent }
|
{ path: 'holdings', component: HomeHoldingsComponent }
|
||||||
]
|
],
|
||||||
|
component: ZenPageComponent,
|
||||||
|
path: '',
|
||||||
|
title: 'Overview'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
23
apps/client/src/app/services/page-title.strategy.ts
Normal file
23
apps/client/src/app/services/page-title.strategy.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { Title } from '@angular/platform-browser';
|
||||||
|
import { RouterStateSnapshot, TitleStrategy } from '@angular/router';
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class PageTitleStrategy extends TitleStrategy {
|
||||||
|
private static readonly DEFAULT_TITLE =
|
||||||
|
'Ghostfolio – Open Source Wealth Management Software';
|
||||||
|
|
||||||
|
public constructor(private readonly title: Title) {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override updateTitle(routerState: RouterStateSnapshot) {
|
||||||
|
const title = this.buildTitle(routerState);
|
||||||
|
|
||||||
|
if (title) {
|
||||||
|
this.title.setTitle(`${title} – ${PageTitleStrategy.DEFAULT_TITLE}`);
|
||||||
|
} else {
|
||||||
|
this.title.setTitle(`${PageTitleStrategy.DEFAULT_TITLE}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user