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
611 B
TypeScript
24 lines
611 B
TypeScript
import {Component, OnInit} from '@angular/core';
|
|
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.currentUser.subscribe(user => {
|
|
if (user.loggedIn !== true) {
|
|
this.selfservice.checkIfLoggedIn().subscribe();
|
|
}
|
|
});
|
|
}
|
|
|
|
}
|