16 lines
394 B
TypeScript
16 lines
394 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import { CanActivate, Router } from '@angular/router';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class ExternalRedirectGuard implements CanActivate {
|
|
|
|
constructor(private router: Router) {}
|
|
|
|
canActivate(): boolean {
|
|
window.location.href = "https://arti24.eu/about-me";
|
|
return false; // Zatrzymuje dalszą nawigację w Angularze
|
|
}
|
|
}
|