11 lines
398 B
TypeScript
11 lines
398 B
TypeScript
import { inject } from '@angular/core';
|
|
import { CanActivateFn, Router, UrlTree, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
|
import { AuthService } from './auth.service';
|
|
|
|
export const authGuard: CanActivateFn = (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {
|
|
const authService = inject(AuthService);
|
|
const router = inject(Router);
|
|
|
|
return true;
|
|
};
|