Kamil Chmielowski
Web / Angular
Jasmine code coverage report for cv app.
You can contact with me by email: kamilchmielowski94@gmail.com or my page.
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 39 40 41 42 43 44 45 46 47 48 49 | 1x 10x 10x 10x 10x 10x 10x 11x 11x 7x 7x | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { SvgIconComponent } from 'angular-svg-icon';
import { TranslateModule } from '@ngx-translate/core';
import { CurrentYearService } from '../../../../services/current-year/current-year.service';
import { environment } from '../../../../../environments/environment';
import { SectionTitleComponent } from '../../section-title/section-title.component';
@Component({
selector: 'app-about-me',
templateUrl: './about-me.component.html',
styleUrls: ['./about-me.component.scss'],
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
CommonModule,
SectionTitleComponent,
SvgIconComponent,
TranslateModule,
]
})
export class AboutMeComponent implements OnInit {
protected readonly environment = environment;
protected currentYear = new Date().getFullYear();
private getCurrentYear$ = this.currentYearService.getCurrentYear()
.pipe(takeUntilDestroyed(this.destroyRef));
constructor(
private cdr: ChangeDetectorRef,
private currentYearService: CurrentYearService,
private destroyRef: DestroyRef,
) {}
ngOnInit() {
this.fetchCurrentYear();
}
private fetchCurrentYear(): void {
this.getCurrentYear$.subscribe(currentYear => {
this.currentYear = currentYear;
this.cdr.markForCheck();
});
}
}
|