mempool/frontend/src/app/app-routing.module.ts

224 lines
5.5 KiB
TypeScript
Raw Normal View History

2019-07-21 16:59:47 +02:00
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { StartComponent } from './components/start/start.component';
import { TransactionComponent } from './components/transaction/transaction.component';
import { BlockComponent } from './components/block/block.component';
import { AddressComponent } from './components/address/address.component';
import { MasterPageComponent } from './components/master-page/master-page.component';
import { AboutComponent } from './components/about/about.component';
import { TelevisionComponent } from './components/television/television.component';
import { StatisticsComponent } from './components/statistics/statistics.component';
import { MempoolBlockComponent } from './components/mempool-block/mempool-block.component';
2020-04-28 12:10:31 +02:00
import { AssetComponent } from './components/asset/asset.component';
import { AssetsComponent } from './assets/assets.component';
2020-07-02 12:56:15 +02:00
import { StatusViewComponent } from './components/status-view/status-view.component';
import { DashboardComponent } from './dashboard/dashboard.component';
import { LatestBlocksComponent } from './components/latest-blocks/latest-blocks.component';
2020-10-07 18:24:01 +02:00
import { ApiDocsComponent } from './components/api-docs/api-docs.component';
2019-07-21 16:59:47 +02:00
const routes: Routes = [
{
path: '',
2019-07-27 17:43:17 +02:00
component: MasterPageComponent,
children: [
{
path: '',
component: StartComponent,
children: [
{
path: '',
component: DashboardComponent,
},
{
path: 'tx/:id',
component: TransactionComponent
},
{
path: 'block/:id',
component: BlockComponent
},
{
path: 'mempool-block/:id',
component: MempoolBlockComponent
},
],
2019-07-27 17:43:17 +02:00
},
{
path: 'blocks',
component: LatestBlocksComponent,
},
2019-07-27 17:43:17 +02:00
{
path: 'graphs',
component: StatisticsComponent,
2019-07-27 17:43:17 +02:00
},
{
path: 'about',
component: AboutComponent,
2019-07-27 17:43:17 +02:00
},
2020-10-07 18:24:01 +02:00
{
path: 'api',
component: ApiDocsComponent,
},
2019-11-06 08:35:02 +01:00
{
path: 'address/:id',
children: [],
component: AddressComponent
2019-11-06 08:35:02 +01:00
},
2019-07-27 17:43:17 +02:00
],
2019-07-21 16:59:47 +02:00
},
{
path: 'liquid',
children: [
{
path: '',
2020-07-02 17:34:16 +02:00
component: MasterPageComponent,
children: [
{
path: '',
2020-07-02 17:34:16 +02:00
component: StartComponent,
children: [
{
path: '',
component: DashboardComponent
2020-07-02 17:34:16 +02:00
},
{
path: 'tx/:id',
component: TransactionComponent
},
{
path: 'block/:id',
component: BlockComponent
},
{
path: 'mempool-block/:id',
component: MempoolBlockComponent
},
],
},
{
path: 'blocks',
component: LatestBlocksComponent,
},
{
2020-07-02 17:34:16 +02:00
path: 'graphs',
component: StatisticsComponent,
},
{
2020-07-02 17:34:16 +02:00
path: 'address/:id',
component: AddressComponent
},
{
2020-07-02 17:34:16 +02:00
path: 'asset/:id',
component: AssetComponent
},
{
2020-07-02 17:34:16 +02:00
path: 'assets',
component: AssetsComponent,
},
2020-10-07 18:24:01 +02:00
{
path: 'api',
component: ApiDocsComponent,
},
],
},
{
2020-07-02 17:34:16 +02:00
path: 'tv',
component: TelevisionComponent
},
{
2020-07-02 17:34:16 +02:00
path: 'status',
component: StatusViewComponent
},
{
path: '**',
redirectTo: ''
},
2020-07-02 17:34:16 +02:00
]
},
{
path: 'testnet',
children: [
{
path: '',
2020-07-02 17:34:16 +02:00
component: MasterPageComponent,
children: [
{
path: '',
2020-07-02 17:34:16 +02:00
component: StartComponent,
children: [
{
path: '',
component: DashboardComponent
2020-07-02 17:34:16 +02:00
},
{
path: 'tx/:id',
component: TransactionComponent
},
{
path: 'block/:id',
component: BlockComponent
},
{
path: 'mempool-block/:id',
component: MempoolBlockComponent
},
],
},
{
path: 'blocks',
component: LatestBlocksComponent,
},
2020-07-02 17:34:16 +02:00
{
path: 'graphs',
component: StatisticsComponent,
},
{
path: 'address/:id',
children: [],
component: AddressComponent
},
2020-10-07 18:24:01 +02:00
{
path: 'api',
component: ApiDocsComponent,
},
],
},
{
2020-07-02 17:34:16 +02:00
path: 'tv',
component: TelevisionComponent
},
{
2020-07-02 17:34:16 +02:00
path: 'status',
component: StatusViewComponent
},
{
path: '**',
redirectTo: ''
},
2020-07-02 17:34:16 +02:00
]
},
{
path: 'bisq',
component: MasterPageComponent,
loadChildren: () => import('./bisq/bisq.module').then(m => m.BisqModule)
},
2019-07-21 16:59:47 +02:00
{
2019-07-27 17:43:17 +02:00
path: 'tv',
component: TelevisionComponent,
2019-07-21 16:59:47 +02:00
},
{
2020-07-02 17:34:16 +02:00
path: 'status',
component: StatusViewComponent
},
2019-07-21 16:59:47 +02:00
{
path: '**',
redirectTo: ''
},
2019-07-21 16:59:47 +02:00
];
2019-07-21 16:59:47 +02:00
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }