mempool/frontend/src/app/lightning/lightning.routing.module.ts
2022-07-16 23:23:13 +02:00

47 lines
1.2 KiB
TypeScript

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { LightningDashboardComponent } from './lightning-dashboard/lightning-dashboard.component';
import { LightningWrapperComponent } from './lightning-wrapper/lightning-wrapper.component';
import { NodeComponent } from './node/node.component';
import { ChannelComponent } from './channel/channel.component';
import { NodesPerCountry } from './nodes-per-country/nodes-per-country.component';
const routes: Routes = [
{
path: '',
component: LightningWrapperComponent,
children: [
{
path: '',
component: LightningDashboardComponent,
},
{
path: 'node/:public_key',
component: NodeComponent,
},
{
path: 'channel/:short_id',
component: ChannelComponent,
},
{
path: 'nodes/country/:country',
component: NodesPerCountry,
},
{
path: '**',
redirectTo: ''
}
]
},
{
path: '**',
redirectTo: ''
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class LightningRoutingModule { }