fixed bug where block detail did not retain data after leaving view and coming back

This commit is contained in:
Darren Nelsen 2017-08-11 17:29:29 -04:00
parent 2226a2cc18
commit 34792d5d65
2 changed files with 2 additions and 5 deletions

View File

@ -28,7 +28,9 @@ export class BlockDetailPage {
constructor(public navCtrl: NavController, private http: Http, public navParams: NavParams, private api: ApiProvider, public currency: CurrencyProvider) {
this.blockHash = navParams.get('blockHash');
}
public ionViewDidLoad(): void {
this.http.get(this.api.apiPrefix + 'block/' + this.blockHash).subscribe(
(data) => {
this.block = JSON.parse(data['_body']);
@ -41,10 +43,6 @@ export class BlockDetailPage {
);
}
public ionViewWillLeave(): void {
this.loading = true;
}
public goToPreviousBlock(): void {
this.navCtrl.push('block-detail', {
'blockHash': this.block.previousblockhash

View File

@ -15,7 +15,6 @@ export class SplitPipe implements PipeTransform {
*/
public transform(value: string, delimiter: string): Array<string> {
let array: Array<string> = value.split(delimiter);
console.log('split is', array);
return array;
}
}