Newer
Older
import { ProfileService } from './profile/services/profile.service';
import { AuthService } from './services/auth.service';
import { RouterListenerService } from './services/routerListener.service';
import { WindowScrollService } from './shared/service/windowscroll.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
constructor(
public printService: PrintService,
private authService: AuthService,
private profilService: ProfileService,
private routerListenerService: RouterListenerService,
private windowScrollService: WindowScrollService
) {
if (this.authService.isLoggedIn()) {
this.profilService.getProfile();
}
this.setHeightApp();
window.addEventListener('resize', () => {
this.setHeightApp();
});
}
private setHeightApp(): void {
const vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
public onScrollDown(event): void {
this.windowScrollService.scrollY.next(event);
}