Browse Source

web-ui: Fix issue while navigating on BlockDetails view

While navigating to other blocks from the BlockDetails view, the
page was being redirected without any effect.
scalafmt-draft
Alexis Hernandez 7 years ago
parent
commit
ca6cc0b025
  1. 5
      web-ui/src/app/components/block-details/block-details.component.ts

5
web-ui/src/app/components/block-details/block-details.component.ts

@ -26,7 +26,10 @@ export class BlockDetailsComponent implements OnInit {
private errorService: ErrorService) { }
ngOnInit() {
const blockhash = this.route.snapshot.paramMap.get('blockhash');
this.route.params.forEach(params => this.onBlockhash(params['blockhash']));
}
private onBlockhash(blockhash: string) {
this.blocksService.get(blockhash).subscribe(
response => this.onBlockRetrieved(response),
response => this.onError(response)

Loading…
Cancel
Save