activated typescript strict mode

This commit is contained in:
2021-05-22 15:30:04 +02:00
parent a195fafa6b
commit cb2c028ca4
76 changed files with 511 additions and 296 deletions

View File

@@ -10,15 +10,15 @@ import {PerfectScrollbarComponent} from 'ngx-perfect-scrollbar';
animations: [fader],
})
export class AppComponent implements OnInit {
@ViewChild('scrollbar', {static: false}) public scrollbar: PerfectScrollbarComponent;
@ViewChild('scrollbar', {static: false}) public scrollbar: PerfectScrollbarComponent | null = null;
public constructor(private scrollService: ScrollService) {
scrollService.restoreScrollPosition$.subscribe(pos => {
if (this.scrollbar && pos) this.scrollbar.directiveRef.scrollTo(0, pos, 300);
if (this.scrollbar && pos) this.scrollbar.directiveRef?.scrollTo(0, pos, 300);
});
}
public static hideLoader: () => void = () => document.querySelector('#load-bg').classList.add('hidden');
public static hideLoader: () => void = () => document.querySelector('#load-bg')?.classList.add('hidden');
public ngOnInit(): void {
setTimeout(() => AppComponent.hideLoader(), 800);