30 lines
692 B
TypeScript
30 lines
692 B
TypeScript
|
import { AsyncPipe, JsonPipe } from '@angular/common';
|
||
|
import { Component } from '@angular/core';
|
||
|
import { RouterOutlet } from '@angular/router';
|
||
|
import { AdminService } from '@core/server';
|
||
|
|
||
|
import { AuthService } from './core/auth/auth.service';
|
||
|
|
||
|
@Component({
|
||
|
selector: 'app-root',
|
||
|
imports: [RouterOutlet, JsonPipe, AsyncPipe],
|
||
|
templateUrl: './app.component.html',
|
||
|
styleUrl: './app.component.scss'
|
||
|
})
|
||
|
export class AppComponent {
|
||
|
constructor(
|
||
|
private api: AdminService,
|
||
|
private auth: AuthService
|
||
|
){
|
||
|
}
|
||
|
test() {
|
||
|
return this.api.configuration;
|
||
|
}
|
||
|
login(){
|
||
|
this.auth.login();
|
||
|
}
|
||
|
logout(){
|
||
|
this.auth.logout();
|
||
|
}
|
||
|
}
|