mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 14:50:52 +01:00
Re-define sub mining routes properly and use router outlet
This commit is contained in:
parent
50f86ba152
commit
38b37a3ee7
7 changed files with 124 additions and 30 deletions
|
@ -29,6 +29,8 @@ import { AssetsComponent } from './components/assets/assets.component';
|
|||
import { PoolComponent } from './components/pool/pool.component';
|
||||
import { MiningDashboardComponent } from './components/mining-dashboard/mining-dashboard.component';
|
||||
import { DifficultyChartComponent } from './components/difficulty-chart/difficulty-chart.component';
|
||||
import { HashrateChartComponent } from './components/hashrate-chart/hashrate-chart.component';
|
||||
import { MiningStartComponent } from './components/mining-start/mining-start.component';
|
||||
|
||||
let routes: Routes = [
|
||||
{
|
||||
|
@ -70,17 +72,36 @@ let routes: Routes = [
|
|||
component: LatestBlocksComponent,
|
||||
},
|
||||
{
|
||||
path: 'mining/difficulty',
|
||||
path: 'mining',
|
||||
component: MiningStartComponent,
|
||||
children: [
|
||||
{
|
||||
path: 'difficulty',
|
||||
component: DifficultyChartComponent,
|
||||
},
|
||||
{
|
||||
path: 'mining/pools',
|
||||
path: 'hashrate',
|
||||
component: HashrateChartComponent,
|
||||
},
|
||||
{
|
||||
path: 'pools',
|
||||
component: PoolRankingComponent,
|
||||
},
|
||||
{
|
||||
path: 'mining/pool/:poolId',
|
||||
path: 'pool',
|
||||
children: [
|
||||
{
|
||||
path: ':poolId',
|
||||
component: PoolComponent,
|
||||
},
|
||||
{
|
||||
path: ':poolId/hashrate',
|
||||
component: HashrateChartComponent,
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'graphs',
|
||||
component: StatisticsComponent,
|
||||
|
@ -170,17 +191,36 @@ let routes: Routes = [
|
|||
component: LatestBlocksComponent,
|
||||
},
|
||||
{
|
||||
path: 'mining/difficulty',
|
||||
path: 'mining',
|
||||
component: MiningStartComponent,
|
||||
children: [
|
||||
{
|
||||
path: 'difficulty',
|
||||
component: DifficultyChartComponent,
|
||||
},
|
||||
{
|
||||
path: 'mining/pools',
|
||||
path: 'hashrate',
|
||||
component: HashrateChartComponent,
|
||||
},
|
||||
{
|
||||
path: 'pools',
|
||||
component: PoolRankingComponent,
|
||||
},
|
||||
{
|
||||
path: 'mining/pool/:poolId',
|
||||
path: 'pool',
|
||||
children: [
|
||||
{
|
||||
path: ':poolId',
|
||||
component: PoolComponent,
|
||||
},
|
||||
{
|
||||
path: ':poolId/hashrate',
|
||||
component: HashrateChartComponent,
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'graphs',
|
||||
component: StatisticsComponent,
|
||||
|
@ -264,17 +304,36 @@ let routes: Routes = [
|
|||
component: LatestBlocksComponent,
|
||||
},
|
||||
{
|
||||
path: 'mining/difficulty',
|
||||
path: 'mining',
|
||||
component: MiningStartComponent,
|
||||
children: [
|
||||
{
|
||||
path: 'difficulty',
|
||||
component: DifficultyChartComponent,
|
||||
},
|
||||
{
|
||||
path: 'mining/pools',
|
||||
path: 'hashrate',
|
||||
component: HashrateChartComponent,
|
||||
},
|
||||
{
|
||||
path: 'pools',
|
||||
component: PoolRankingComponent,
|
||||
},
|
||||
{
|
||||
path: 'mining/pool/:poolId',
|
||||
path: 'pool',
|
||||
children: [
|
||||
{
|
||||
path: ':poolId',
|
||||
component: PoolComponent,
|
||||
},
|
||||
{
|
||||
path: ':poolId/hashrate',
|
||||
component: HashrateChartComponent,
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'graphs',
|
||||
component: StatisticsComponent,
|
||||
|
|
|
@ -71,6 +71,8 @@ import { AssetGroupComponent } from './components/assets/asset-group/asset-group
|
|||
import { AssetCirculationComponent } from './components/asset-circulation/asset-circulation.component';
|
||||
import { MiningDashboardComponent } from './components/mining-dashboard/mining-dashboard.component';
|
||||
import { DifficultyChartComponent } from './components/difficulty-chart/difficulty-chart.component';
|
||||
import { HashrateChartComponent } from './components/hashrate-chart/hashrate-chart.component';
|
||||
import { MiningStartComponent } from './components/mining-start/mining-start.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
|
@ -124,6 +126,8 @@ import { DifficultyChartComponent } from './components/difficulty-chart/difficul
|
|||
AssetCirculationComponent,
|
||||
MiningDashboardComponent,
|
||||
DifficultyChartComponent,
|
||||
HashrateChartComponent,
|
||||
MiningStartComponent,
|
||||
],
|
||||
imports: [
|
||||
BrowserModule.withServerTransition({ appId: 'serverApp' }),
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<p>hashrate-chart works!</p>
|
|
@ -0,0 +1,15 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-hashrate-chart',
|
||||
templateUrl: './hashrate-chart.component.html',
|
||||
styleUrls: ['./hashrate-chart.component.scss']
|
||||
})
|
||||
export class HashrateChartComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
<router-outlet></router-outlet>
|
|
@ -0,0 +1,14 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-mining-start',
|
||||
templateUrl: './mining-start.component.html',
|
||||
})
|
||||
export class MiningStartComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue