| import { Component, inject } from '@angular/core'; | |
| import { Router, RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; | |
| import { AuthService } from '../auth/auth.service'; | |
| ({ | |
| 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'); | |
| } | |
| } | |