py-learn / src /app /app.component.ts
Oviya
Deploy Angular to HF Space
e4ab6d0
raw
history blame
542 Bytes
import { Component } from '@angular/core';
import { AuthService } from './auth/auth.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
export class AppComponent {
constructor(private authService: AuthService) { }
title = 'Py-Learn';
ngOnInit(): void {
this.authService.checkSession().subscribe((status) => {
if (status) {
this.authService.startAutoRefresh(); // ✅ Start auto-refresh once app loads and session is valid
}
});
}
}