You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
657 B
TypeScript

import { Component, OnInit } from '@angular/core';
import { User } from './models/user';
import { DatasharingService } from './services/datasharing.service';
import { SelfService } from './services/selfservice/self.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.sass']
})
export class AppComponent implements OnInit {
constructor(private data: DatasharingService, private selfservice: SelfService) { }
ngOnInit() {
this.data.currentUserInfo.subscribe(user => {
5 years ago
if (user.loggedIn !== true) {
this.selfservice.checkIfLoggedIn().subscribe();
5 years ago
}
});
}
}