mempool/frontend/src/app/components/blockchain/blockchain.component.ts
2020-05-09 20:37:50 +07:00

23 lines
616 B
TypeScript

import { Component, OnInit } from '@angular/core';
import { StateService } from 'src/app/services/state.service';
@Component({
selector: 'app-blockchain',
templateUrl: './blockchain.component.html',
styleUrls: ['./blockchain.component.scss']
})
export class BlockchainComponent implements OnInit {
txTrackingLoading = false;
txShowTxNotFound = false;
isLoading = true;
constructor(
private stateService: StateService,
) {}
ngOnInit() {
this.stateService.blocks$.subscribe(() => this.isLoading = false);
this.stateService.networkChanged$.subscribe(() => this.isLoading = true);
}
}