@ -1,6 +1,10 @@
import { AuthGuard } from '@ghostfolio/client/core/auth.guard' ;
import { AuthGuard } from '@ghostfolio/client/core/auth.guard' ;
import { PageTitleStrategy } from '@ghostfolio/client/services/page-title.strategy' ;
import { PageTitleStrategy } from '@ghostfolio/client/services/page-title.strategy' ;
import { paths } from '@ghostfolio/common/paths' ;
import {
publicRoutes ,
routes as ghostfolioRoutes ,
internalRoutes
} from '@ghostfolio/common/routes' ;
import { NgModule } from '@angular/core' ;
import { NgModule } from '@angular/core' ;
import { RouterModule , Routes , TitleStrategy } from '@angular/router' ;
import { RouterModule , Routes , TitleStrategy } from '@angular/router' ;
@ -9,26 +13,26 @@ import { ModulePreloadService } from './core/module-preload.service';
const routes : Routes = [
const routes : Routes = [
{
{
path : path s.about,
path : ghostfolioRoute s.about,
loadChildren : ( ) = >
loadChildren : ( ) = >
import ( './pages/about/about-page.module' ) . then ( ( m ) = > m . AboutPageModule )
import ( './pages/about/about-page.module' ) . then ( ( m ) = > m . AboutPageModule )
} ,
} ,
{
{
path : path s.account,
path : ghostfolioRoute s.account,
loadChildren : ( ) = >
loadChildren : ( ) = >
import ( './pages/user-account/user-account-page.module' ) . then (
import ( './pages/user-account/user-account-page.module' ) . then (
( m ) = > m . UserAccountPageModule
( m ) = > m . UserAccountPageModule
)
)
} ,
} ,
{
{
path : paths.accounts ,
path : internalRoutes.accounts.path ,
loadChildren : ( ) = >
loadChildren : ( ) = >
import ( './pages/accounts/accounts-page.module' ) . then (
import ( './pages/accounts/accounts-page.module' ) . then (
( m ) = > m . AccountsPageModule
( m ) = > m . AccountsPageModule
)
)
} ,
} ,
{
{
path : path s.adminControl,
path : ghostfolioRoute s.adminControl,
loadChildren : ( ) = >
loadChildren : ( ) = >
import ( './pages/admin/admin-page.module' ) . then ( ( m ) = > m . AdminPageModule )
import ( './pages/admin/admin-page.module' ) . then ( ( m ) = > m . AdminPageModule )
} ,
} ,
@ -38,16 +42,16 @@ const routes: Routes = [
import ( './pages/api/api-page.component' ) . then (
import ( './pages/api/api-page.component' ) . then (
( c ) = > c . GfApiPageComponent
( c ) = > c . GfApiPageComponent
) ,
) ,
path : path s.api,
path : ghostfolioRoute s.api,
title : 'Ghostfolio API'
title : 'Ghostfolio API'
} ,
} ,
{
{
path : path s.auth,
path : ghostfolioRoute s.auth,
loadChildren : ( ) = >
loadChildren : ( ) = >
import ( './pages/auth/auth-page.module' ) . then ( ( m ) = > m . AuthPageModule )
import ( './pages/auth/auth-page.module' ) . then ( ( m ) = > m . AuthPageModule )
} ,
} ,
{
{
path : path s.blog,
path : ghostfolioRoute s.blog,
loadChildren : ( ) = >
loadChildren : ( ) = >
import ( './pages/blog/blog-page.module' ) . then ( ( m ) = > m . BlogPageModule )
import ( './pages/blog/blog-page.module' ) . then ( ( m ) = > m . BlogPageModule )
} ,
} ,
@ -57,10 +61,10 @@ const routes: Routes = [
import ( './pages/demo/demo-page.component' ) . then (
import ( './pages/demo/demo-page.component' ) . then (
( c ) = > c . GfDemoPageComponent
( c ) = > c . GfDemoPageComponent
) ,
) ,
path : path s.demo
path : ghostfolioRoute s.demo
} ,
} ,
{
{
path : path s.faq,
path : ghostfolioRoute s.faq,
loadChildren : ( ) = >
loadChildren : ( ) = >
import ( './pages/faq/faq-page.module' ) . then ( ( m ) = > m . FaqPageModule )
import ( './pages/faq/faq-page.module' ) . then ( ( m ) = > m . FaqPageModule )
} ,
} ,
@ -70,11 +74,11 @@ const routes: Routes = [
import ( './pages/features/features-page.component' ) . then (
import ( './pages/features/features-page.component' ) . then (
( c ) = > c . GfFeaturesPageComponent
( c ) = > c . GfFeaturesPageComponent
) ,
) ,
path : path s.features,
path : ghostfolioRoute s.features,
title : $localize ` Features `
title : $localize ` Features `
} ,
} ,
{
{
path : paths.home ,
path : internalRoutes.home.path ,
loadChildren : ( ) = >
loadChildren : ( ) = >
import ( './pages/home/home-page.module' ) . then ( ( m ) = > m . HomePageModule )
import ( './pages/home/home-page.module' ) . then ( ( m ) = > m . HomePageModule )
} ,
} ,
@ -84,58 +88,58 @@ const routes: Routes = [
import ( './pages/i18n/i18n-page.component' ) . then (
import ( './pages/i18n/i18n-page.component' ) . then (
( c ) = > c . GfI18nPageComponent
( c ) = > c . GfI18nPageComponent
) ,
) ,
path : path s.i18n,
path : ghostfolioRoute s.i18n,
title : $localize ` Internationalization `
title : $localize ` Internationalization `
} ,
} ,
{
{
path : path s.markets,
path : ghostfolioRoute s.markets,
loadChildren : ( ) = >
loadChildren : ( ) = >
import ( './pages/markets/markets-page.module' ) . then (
import ( './pages/markets/markets-page.module' ) . then (
( m ) = > m . MarketsPageModule
( m ) = > m . MarketsPageModule
)
)
} ,
} ,
{
{
path : paths.openStartup ,
path : publicRoutes.openStartup.path ,
loadChildren : ( ) = >
loadChildren : ( ) = >
import ( './pages/open/open-page.module' ) . then ( ( m ) = > m . OpenPageModule )
import ( './pages/open/open-page.module' ) . then ( ( m ) = > m . OpenPageModule )
} ,
} ,
{
{
path : paths.portfolio ,
path : internalRoutes.portfolio.path ,
loadChildren : ( ) = >
loadChildren : ( ) = >
import ( './pages/portfolio/portfolio-page.module' ) . then (
import ( './pages/portfolio/portfolio-page.module' ) . then (
( m ) = > m . PortfolioPageModule
( m ) = > m . PortfolioPageModule
)
)
} ,
} ,
{
{
path : path s.pricing,
path : ghostfolioRoute s.pricing,
loadChildren : ( ) = >
loadChildren : ( ) = >
import ( './pages/pricing/pricing-page.module' ) . then (
import ( './pages/pricing/pricing-page.module' ) . then (
( m ) = > m . PricingPageModule
( m ) = > m . PricingPageModule
)
)
} ,
} ,
{
{
path : path s.public,
path : ghostfolioRoute s.public,
loadChildren : ( ) = >
loadChildren : ( ) = >
import ( './pages/public/public-page.module' ) . then (
import ( './pages/public/public-page.module' ) . then (
( m ) = > m . PublicPageModule
( m ) = > m . PublicPageModule
)
)
} ,
} ,
{
{
path : paths.register ,
path : publicRoutes.register.path ,
loadChildren : ( ) = >
loadChildren : ( ) = >
import ( './pages/register/register-page.module' ) . then (
import ( './pages/register/register-page.module' ) . then (
( m ) = > m . RegisterPageModule
( m ) = > m . RegisterPageModule
)
)
} ,
} ,
{
{
path : path s.resources,
path : ghostfolioRoute s.resources,
loadChildren : ( ) = >
loadChildren : ( ) = >
import ( './pages/resources/resources-page.module' ) . then (
import ( './pages/resources/resources-page.module' ) . then (
( m ) = > m . ResourcesPageModule
( m ) = > m . ResourcesPageModule
)
)
} ,
} ,
{
{
path : path s.start,
path : ghostfolioRoute s.start,
loadChildren : ( ) = >
loadChildren : ( ) = >
import ( './pages/landing/landing-page.module' ) . then (
import ( './pages/landing/landing-page.module' ) . then (
( m ) = > m . LandingPageModule
( m ) = > m . LandingPageModule
@ -146,11 +150,11 @@ const routes: Routes = [
import ( './pages/webauthn/webauthn-page.component' ) . then (
import ( './pages/webauthn/webauthn-page.component' ) . then (
( c ) = > c . GfWebauthnPageComponent
( c ) = > c . GfWebauthnPageComponent
) ,
) ,
path : path s.webauthn,
path : ghostfolioRoute s.webauthn,
title : $localize ` Sign in `
title : $localize ` Sign in `
} ,
} ,
{
{
path : paths.zen ,
path : internalRoutes.zen.path ,
loadChildren : ( ) = >
loadChildren : ( ) = >
import ( './pages/zen/zen-page.module' ) . then ( ( m ) = > m . ZenPageModule )
import ( './pages/zen/zen-page.module' ) . then ( ( m ) = > m . ZenPageModule )
} ,
} ,