You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ghostfolio/apps/client/src/app/app-routing.module.ts

111 lines
2.6 KiB

4 years ago
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ModulePreloadService } from './core/module-preload.service';
const routes: Routes = [
{
path: 'about',
loadChildren: () =>
import('./pages/about/about-page.module').then((m) => m.AboutPageModule)
},
{
path: 'account',
loadChildren: () =>
import('./pages/account/account-page.module').then(
(m) => m.AccountPageModule
)
},
{
path: 'accounts',
loadChildren: () =>
import('./pages/accounts/accounts-page.module').then(
(m) => m.AccountsPageModule
)
},
{
path: 'admin',
loadChildren: () =>
import('./pages/admin/admin-page.module').then((m) => m.AdminPageModule)
},
4 years ago
{
path: 'analysis',
loadChildren: () =>
import('./pages/analysis/analysis-page.module').then(
(m) => m.AnalysisPageModule
)
},
{
path: 'auth',
loadChildren: () =>
import('./pages/auth/auth-page.module').then((m) => m.AuthPageModule)
},
4 years ago
{
path: 'home',
loadChildren: () =>
import('./pages/home/home-page.module').then((m) => m.HomePageModule)
},
{
path: 'pricing',
loadChildren: () =>
import('./pages/pricing/pricing-page.module').then(
(m) => m.PricingPageModule
)
},
4 years ago
{
path: 'report',
loadChildren: () =>
import('./pages/report/report-page.module').then(
(m) => m.ReportPageModule
)
},
{
path: 'resources',
loadChildren: () =>
import('./pages/resources/resources-page.module').then(
(m) => m.ResourcesPageModule
)
},
{
path: 'start',
loadChildren: () =>
import('./pages/login/login-page.module').then((m) => m.LoginPageModule)
},
{
path: 'transactions',
loadChildren: () =>
import('./pages/transactions/transactions-page.module').then(
(m) => m.TransactionsPageModule
)
},
{
path: 'zen',
loadChildren: () =>
import('./pages/zen/zen-page.module').then((m) => m.ZenPageModule)
},
4 years ago
{
// wildcard, if requested url doesn't match any paths for routes defined
// earlier
path: '**',
redirectTo: 'home',
4 years ago
pathMatch: 'full'
}
];
@NgModule({
imports: [
RouterModule.forRoot(
routes,
// Preload all lazy loaded modules with the attribute preload === true
{
preloadingStrategy: ModulePreloadService,
// enableTracing: true // <-- debugging purposes only
relativeLinkResolution: 'legacy'
4 years ago
}
)
],
providers: [ModulePreloadService],
exports: [RouterModule]
})
export class AppRoutingModule {}