Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 99x 9x 9x 9x 8x 9x | import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
import { NgIf} from '@angular/common';
import { TableModule } from 'primeng/table';
import { ButtonModule } from 'primeng/button';
import { TagModule } from 'primeng/tag';
import { TwinpadApiService } from '../../services/twinpad-api.service';
import { SignalStats } from '../../models/signals';
import { SignalsTableComponent } from '../signals-table/signals-table.component';
import { HttpErrorResponse } from '@angular/common/http';
import { ErrorComponent } from '../error/error.component';
import { NumberSuffixPipe } from '../../pipes/number-suffix.pipe';
@Component({
selector: 'app-signals',
imports: [ErrorComponent, NgIf, NumberSuffixPipe,
TableModule, ButtonModule, TagModule, SignalsTableComponent],
providers: [],
templateUrl: './signals.component.html',
styleUrl: './signals.component.scss'
})
export class SignalsComponent implements OnInit {
@ViewChild(SignalsTableComponent) signalsTableComponent!: SignalsTableComponent;
signalStats: SignalStats;
signalsError: HttpErrorResponse;
constructor(private twinpadApiService: TwinpadApiService, private cdr: ChangeDetectorRef) {}
ngOnInit() {
this.twinpadApiService.getSignalStats().subscribe((data: SignalStats) => {
this.signalStats = data;
});
this.cdr.detectChanges();
}
}
|