added search by block hash

This commit is contained in:
Darren Nelsen 2017-08-03 18:24:48 -04:00
parent c1523966f8
commit b274b363ff

View File

@ -31,10 +31,14 @@ export class BlocksPage {
let apiPrefix: string = this.api.apiPrefix;
this.http.get(apiPrefix + 'block/' + this.q).subscribe(
(data) => {
function (data: any) {
this.resetSearch();
console.log('block', data);
},
let parsedData: any = JSON.parse(data._body);
this.navCtrl.push('block-detail', {
'blockHash': parsedData.hash
});
}.bind(this),
() => {
this.http.get(apiPrefix + 'tx/' + this.q).subscribe(
function (data: any) {