revert: remove language routing (was breaking navigation)
- Reverted app.routes.ts to original simple routing - Removed language guard - Language routing needs more comprehensive implementation
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import { Routes } from '@angular/router';
|
||||
import { languageGuard } from './guards/language.guard';
|
||||
|
||||
// Child routes without language prefix
|
||||
const childRoutes: Routes = [
|
||||
export const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
loadComponent: () => import('./pages/home/home.component').then(m => m.HomeComponent)
|
||||
@@ -66,25 +64,9 @@ const childRoutes: Routes = [
|
||||
{
|
||||
path: 'guarantee',
|
||||
loadComponent: () => import('./pages/info/guarantee/guarantee.component').then(m => m.GuaranteeComponent)
|
||||
}
|
||||
];
|
||||
|
||||
export const routes: Routes = [
|
||||
// Routes with language prefix: /ru, /en, /hy
|
||||
{
|
||||
path: ':lang',
|
||||
canActivate: [languageGuard],
|
||||
children: childRoutes
|
||||
},
|
||||
// Redirect root to default language
|
||||
{
|
||||
path: '',
|
||||
pathMatch: 'full',
|
||||
redirectTo: 'ru'
|
||||
},
|
||||
// Catch-all: redirect unknown routes to home with default language
|
||||
{
|
||||
path: '**',
|
||||
redirectTo: 'ru'
|
||||
redirectTo: ''
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user