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

219 lines
5.3 KiB
TypeScript
Raw Normal View History

2019-07-21 17:59:47 +03: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 17:10:31 +07:00
import { AssetComponent } from './components/asset/asset.component';
import { AssetsComponent } from './assets/assets.component';
2020-07-02 17:56:15 +07: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';
2019-07-21 17:59:47 +03:00
const routes: Routes = [
{
path: '',
2019-07-27 18:43:17 +03: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 18:43:17 +03:00
},
{
path: 'blocks',
component: LatestBlocksComponent,
},
2019-07-27 18:43:17 +03:00
{
path: 'graphs',
component: StatisticsComponent,
2019-07-27 18:43:17 +03:00
},
{
path: 'about',
component: AboutComponent,
2019-07-27 18:43:17 +03:00
},
2019-11-06 15:35:02 +08:00
{
path: 'address/:id',
children: [],
component: AddressComponent
2019-11-06 15:35:02 +08:00
},
2019-07-27 18:43:17 +03:00
],
2019-07-21 17:59:47 +03:00
},
{
path: 'liquid',
children: [
{
path: '',
2020-07-02 22:34:16 +07:00
component: MasterPageComponent,
children: [
{
path: '',
2020-07-02 22:34:16 +07:00
component: StartComponent,
children: [
{
path: '',
component: DashboardComponent
2020-07-02 22:34:16 +07:00
},
{
path: 'tx/:id',
component: TransactionComponent
},
{
path: 'block/:id',
component: BlockComponent
},
{
path: 'mempool-block/:id',
component: MempoolBlockComponent
},
],
},
{
path: 'blocks',
component: LatestBlocksComponent,
},
{
2020-07-02 22:34:16 +07:00
path: 'graphs',
component: StatisticsComponent,
},
{
2020-07-02 22:34:16 +07:00
path: 'about',
component: AboutComponent,
},
{
2020-07-02 22:34:16 +07:00
path: 'address/:id',
component: AddressComponent
},
{
2020-07-02 22:34:16 +07:00
path: 'asset/:id',
component: AssetComponent
},
{
2020-07-02 22:34:16 +07:00
path: 'assets',
component: AssetsComponent,
},
],
},
{
2020-07-02 22:34:16 +07:00
path: 'tv',
component: TelevisionComponent
},
{
2020-07-02 22:34:16 +07:00
path: 'status',
component: StatusViewComponent
},
{
path: '**',
redirectTo: ''
},
2020-07-02 22:34:16 +07:00
]
},
{
path: 'testnet',
children: [
{
path: '',
2020-07-02 22:34:16 +07:00
component: MasterPageComponent,
children: [
{
path: '',
2020-07-02 22:34:16 +07:00
component: StartComponent,
children: [
{
path: '',
component: DashboardComponent
2020-07-02 22:34:16 +07:00
},
{
path: 'tx/:id',
component: TransactionComponent
},
{
path: 'block/:id',
component: BlockComponent
},
{
path: 'mempool-block/:id',
component: MempoolBlockComponent
},
],
},
{
path: 'blocks',
component: LatestBlocksComponent,
},
2020-07-02 22:34:16 +07:00
{
path: 'graphs',
component: StatisticsComponent,
},
{
path: 'about',
component: AboutComponent,
},
{
path: 'address/:id',
children: [],
component: AddressComponent
},
],
},
{
2020-07-02 22:34:16 +07:00
path: 'tv',
component: TelevisionComponent
},
{
2020-07-02 22:34:16 +07:00
path: 'status',
component: StatusViewComponent
},
{
path: '**',
redirectTo: ''
},
2020-07-02 22:34:16 +07:00
]
},
{
path: 'bisq',
component: MasterPageComponent,
loadChildren: () => import('./bisq/bisq.module').then(m => m.BisqModule)
},
2019-07-21 17:59:47 +03:00
{
2019-07-27 18:43:17 +03:00
path: 'tv',
component: TelevisionComponent,
2019-07-21 17:59:47 +03:00
},
{
2020-07-02 22:34:16 +07:00
path: 'status',
component: StatusViewComponent
},
2019-07-21 17:59:47 +03:00
{
path: '**',
redirectTo: ''
},
2019-07-21 17:59:47 +03:00
];
2019-07-21 17:59:47 +03:00
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }