File size: 611 Bytes
bed1116 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import { Component, inject } from '@angular/core';
import { Router, RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';
import { AuthService } from '../auth/auth.service';
@Component({
selector: 'app-shell',
standalone: true,
imports: [RouterLink, RouterLinkActive, RouterOutlet],
templateUrl: './shell.component.html',
styleUrl: './shell.component.css'
})
export class ShellComponent {
private readonly authService = inject(AuthService);
private readonly router = inject(Router);
logOut(): void {
this.authService.logout();
this.router.navigateByUrl('/login');
}
}
|