Use relative pipe for pie chart click event
This commit is contained in:
parent
8114ffe1c8
commit
b075fedd7c
@ -25,7 +25,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="pool text-left" [class]="widget ? 'widget' : ''">
|
<td class="pool text-left" [class]="widget ? 'widget' : ''">
|
||||||
<div class="tooltip-custom">
|
<div class="tooltip-custom">
|
||||||
<a class="clear-link" [routerLink]="[('/mining/pool/' + block.extras.pool.id) | relativeUrl]">
|
<a class="clear-link" [routerLink]="['/mining/pool' | relativeUrl, block.extras.pool.id]">
|
||||||
<img width="25" height="25" src="{{ block.extras.pool['logo'] }}"
|
<img width="25" height="25" src="{{ block.extras.pool['logo'] }}"
|
||||||
onError="this.src = './resources/mining-pools/default.svg'">
|
onError="this.src = './resources/mining-pools/default.svg'">
|
||||||
<span class="pool-name">{{ block.extras.pool.name }}</span>
|
<span class="pool-name">{{ block.extras.pool.name }}</span>
|
||||||
|
@ -10,6 +10,7 @@ import { StorageService } from '../..//services/storage.service';
|
|||||||
import { MiningService, MiningStats } from '../../services/mining.service';
|
import { MiningService, MiningStats } from '../../services/mining.service';
|
||||||
import { StateService } from '../../services/state.service';
|
import { StateService } from '../../services/state.service';
|
||||||
import { chartColors, poolsColor } from 'src/app/app.constants';
|
import { chartColors, poolsColor } from 'src/app/app.constants';
|
||||||
|
import { RelativeUrlPipe } from 'src/app/shared/pipes/relative-url/relative-url.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-pool-ranking',
|
selector: 'app-pool-ranking',
|
||||||
@ -284,7 +285,8 @@ export class PoolRankingComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.zone.run(() => {
|
this.zone.run(() => {
|
||||||
this.router.navigate(['/mining/pool/', e.data.data]);
|
const url = new RelativeUrlPipe(this.stateService).transform(`/mining/pool/${e.data.data}`);
|
||||||
|
this.router.navigate([url]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user