Added routing
This commit is contained in:
+20
-23
@@ -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)
|
||||
},
|
||||
]
|
||||
}
|
||||
];
|
||||
Reference in New Issue
Block a user