accidents-backend / Accident.Web /src /app /shell /shell.component.ts
ChristopherJKoen's picture
Deploy backend from GitLab 9eda6d69
bed1116 verified
Raw
History Blame Contribute Delete
611 Bytes
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');
}
}