Added routing

This commit is contained in:
2026-03-25 16:03:52 +01:00
parent 5be67500c6
commit 822e22690b
16 changed files with 113 additions and 68 deletions
+20 -23
View File
@@ -1,29 +1,26 @@
import { Routes } from '@angular/router';
import {Routes} from '@angular/router';
// TODO: Guard pour empêcher la recherche de pages
export const routes: Routes = [
{path: '', redirectTo: '/login', pathMatch: 'full'},
{path: 'login', loadComponent: () => import('./pages/login/login.component').then(m => m.LoginComponent)},
{
path: '',
pathMatch: 'full',
redirectTo: '/login'
},
{ // TODO: Guard pour empêcher la recherche de page
path: 'login',
loadComponent: () => import('./pages/login/login.component').then(x => x.LoginComponent)
},
{
path: 'home',
loadComponent: () => import('./pages/home/home.component').then(x => x.HomeComponent)
},
{
path: 'groups',
loadComponent: () => import('./pages/groups/groups.component').then(x => x.GroupsComponent)
},
{
path: 'ranking',
loadComponent: () => import('./pages/ranking/ranking.component').then(x => x.RankingComponent)
},
{
path: 'social',
loadComponent: () => import('./pages/social/social.component').then(x => x.SocialComponent)
loadComponent: () => import('./components/navbar/navbar.component').then(m => m.NavbarComponent),
children: [
{path: 'home', loadComponent: () => import('./pages/home/home.component').then(m => m.HomeComponent)},
{
path: 'groups',
loadComponent: () => import('./pages/groups/groups.component').then(m => m.GroupsComponent)
},
{
path: 'ranking',
loadComponent: () => import('./pages/ranking/ranking.component').then(m => m.RankingComponent)
},
{
path: 'social',
loadComponent: () => import('./pages/social/social.component').then(m => m.SocialComponent)
},
]
}
];