20 lines
713 B
TypeScript
20 lines
713 B
TypeScript
import { ChangeDetectionStrategy, Component, inject, OnInit } from '@angular/core';
|
|
import { Router } from '@angular/router';
|
|
import { AuthService } from '../../service/auth.service';
|
|
|
|
@Component({
|
|
selector: 'app-login-success',
|
|
standalone: true,
|
|
imports: [],
|
|
templateUrl: './login-success.component.html',
|
|
styleUrl: './login-success.component.css',
|
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
})
|
|
export default class LoginSuccessComponent implements OnInit {
|
|
private router: Router = inject(Router);
|
|
private authService: AuthService = inject(AuthService);
|
|
async ngOnInit() {
|
|
console.log(this.authService.getAccessToken());
|
|
(this.authService.getUserInfo().then(console.log));
|
|
}
|
|
}
|