redirect to arti24.eu
This commit is contained in:
parent
444ee0481d
commit
725d04f19e
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"topBar":{
|
"topBar":{
|
||||||
"aboutMe" : "O mnie",
|
"aboutMe" : "O mnie",
|
||||||
"depreciationCalculator" :"Kalkulator amortyzacyjny",
|
"depreciationCalculator" : "Kalkulator amortyzacyjny",
|
||||||
"courses" : "Kursy",
|
"courses" : "Kursy",
|
||||||
"friendlyPages" : "Zaprzyjaźnione strony"
|
"friendlyPages" : "Zaprzyjaźnione strony"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,6 +5,7 @@ import { AboutMeComponent } from './about-me/about-me.component';
|
||||||
import { JobfinderComponent } from './jobfinder/jobfinder.component';
|
import { JobfinderComponent } from './jobfinder/jobfinder.component';
|
||||||
import { FixedAssetComponent } from './fixed-asset/fixed-asset.component';
|
import { FixedAssetComponent } from './fixed-asset/fixed-asset.component';
|
||||||
import { FriendlyPagesComponent } from './friendly-pages/friendly-pages.component';
|
import { FriendlyPagesComponent } from './friendly-pages/friendly-pages.component';
|
||||||
|
import { ExternalRedirectGuard } from './ExternalRedirectGuard';
|
||||||
|
|
||||||
|
|
||||||
export const routes: Routes = [
|
export const routes: Routes = [
|
||||||
|
|
@ -14,8 +15,10 @@ export const routes: Routes = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "about-me",
|
path: "about-me",
|
||||||
title:"O mnie",
|
title: "O mnie",
|
||||||
component: AboutMeComponent
|
canActivate: [ExternalRedirectGuard],
|
||||||
|
data: { externalUrl: "https://arti24.eu/about-me" },
|
||||||
|
component: ExternalRedirectGuard
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "asset-calculator",
|
path: "asset-calculator",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue