From ca6cc0b025f98dba2265b89a559865a0c9c2af1f Mon Sep 17 00:00:00 2001 From: Alexis Hernandez Date: Sat, 17 Mar 2018 20:24:02 -0600 Subject: [PATCH] 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. --- .../app/components/block-details/block-details.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web-ui/src/app/components/block-details/block-details.component.ts b/web-ui/src/app/components/block-details/block-details.component.ts index 98f5c6a..49cd556 100644 --- a/web-ui/src/app/components/block-details/block-details.component.ts +++ b/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)