mirror of https://github.com/ghostfolio/ghostfolio
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.
34 lines
1.0 KiB
34 lines
1.0 KiB
import { NgModule } from '@angular/core';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
|
|
|
|
import { PersonalFinanceToolsPageComponent } from './personal-finance-tools-page.component';
|
|
import { products } from './products';
|
|
|
|
const routes: Routes = [
|
|
{
|
|
canActivate: [AuthGuard],
|
|
component: PersonalFinanceToolsPageComponent,
|
|
path: '',
|
|
title: $localize`Personal Finance Tools`
|
|
},
|
|
...products
|
|
.filter(({ key }) => {
|
|
return key !== 'ghostfolio';
|
|
})
|
|
.map(({ component, key, name }) => {
|
|
return {
|
|
canActivate: [AuthGuard],
|
|
path: $localize`open-source-alternative-to` + `-${key}`,
|
|
loadComponent: () =>
|
|
import(`./products/${key}-page.component`).then(() => component),
|
|
title: $localize`Open Source Alternative to ${name}`
|
|
};
|
|
})
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forChild(routes)],
|
|
exports: [RouterModule]
|
|
})
|
|
export class PersonalFinanceToolsPageRoutingModule {}
|
|
|