1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/frontend/app/frame/frame.component.ts
2016-12-26 23:36:38 +01:00

30 lines
797 B
TypeScript

import {Component, ViewEncapsulation} from "@angular/core";
import {RouterLink} from "@angular/router";
import {AuthenticationService} from "../model/network/authentication.service";
import {User} from "../../../common/entities/User";
import {Config} from "../config/Config";
@Component({
selector: 'app-frame',
templateUrl: 'app/frame/frame.component.html',
providers: [RouterLink],
encapsulation: ViewEncapsulation.Emulated
})
export class FrameComponent {
user:User;
authenticationRequired:boolean = false;
constructor(private _authService:AuthenticationService) {
this.user = this._authService.getUser();
this.authenticationRequired = Config.Client.authenticationRequired;
}
logout() {
this._authService.logout();
}
}