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
+26 -3
View File
@@ -469,6 +469,7 @@
"resolved": "https://registry.npmjs.org/@angular/common/-/common-20.3.17.tgz",
"integrity": "sha512-Dqd8f8o9MehszTZIB7o7jrERlwLOSK64gNngK14DCQazz5lpIhAF6hBjx7zjHpa7L9eAYPK1TaxQUXypjzj18Q==",
"license": "MIT",
"peer": true,
"dependencies": {
"tslib": "^2.3.0"
},
@@ -485,6 +486,7 @@
"resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-20.3.17.tgz",
"integrity": "sha512-cj3x6aFk9xOOxX+qEdeN8T5YbnBNWJ4UMHB/LQoDr7/xCJJGa40IhcOAuJeuF2kGqTwx6MCXnvjO8XOQfHhe9g==",
"license": "MIT",
"peer": true,
"dependencies": {
"tslib": "^2.3.0"
},
@@ -498,6 +500,7 @@
"integrity": "sha512-w5pmO1pXO9tUMgUMWstpDmAWh5s1lJWo+2GI/ByaUEgBZkXd2S92sWoDL+bhy+JSvFzdLGdua6BncHBOX7hEjA==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@babel/core": "7.28.3",
"@jridgewell/sourcemap-codec": "^1.4.14",
@@ -530,6 +533,7 @@
"resolved": "https://registry.npmjs.org/@angular/core/-/core-20.3.17.tgz",
"integrity": "sha512-YlQqxMeHI9XJw7I7oM3hYFQd4lQbK37IdlD9ztROIw5FjX6i6lmLU7+X1MQGSRi2r+X9l3IZtl33hRTNvkoUBw==",
"license": "MIT",
"peer": true,
"dependencies": {
"tslib": "^2.3.0"
},
@@ -555,6 +559,7 @@
"resolved": "https://registry.npmjs.org/@angular/forms/-/forms-20.3.17.tgz",
"integrity": "sha512-iGS6NwzcyJzinbPMapsQtcN0ZJ62vr6hcul+FNa40CaK2ePC04S+C5n+DIphzwnwsFHDBIWuTQRfk/lNYdN1JA==",
"license": "MIT",
"peer": true,
"dependencies": {
"tslib": "^2.3.0"
},
@@ -573,6 +578,7 @@
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-20.3.17.tgz",
"integrity": "sha512-GA8pK+0F2/KGdYn5LMpLBrPTkQUwGjQE8Q+qsivOa150cK3OuD0po5PvYK58l+niGIVvm0wB1xGKTHTOiX/+4A==",
"license": "MIT",
"peer": true,
"dependencies": {
"tslib": "^2.3.0"
},
@@ -595,6 +601,7 @@
"resolved": "https://registry.npmjs.org/@angular/router/-/router-20.3.17.tgz",
"integrity": "sha512-p0r0IOJhUcn8WHx4gkSlfwifkkYO5mSDtq4iM5OunZTlSaeSxLb1vTRg2VBgwdzpgAM+eZSMBTTVF/M3pdoELQ==",
"license": "MIT",
"peer": true,
"dependencies": {
"tslib": "^2.3.0"
},
@@ -639,6 +646,7 @@
"integrity": "sha512-yDBHV9kQNcr2/sUr9jghVyz9C3Y5G2zUM2H2lo+9mKv4sFgbA8s8Z9t8D1jiTkGoO/NoIfKMyKWr4s6CN23ZwQ==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^7.27.1",
@@ -1615,6 +1623,7 @@
"integrity": "sha512-nqhDw2ZcAUrKNPwhjinJny903bRhI0rQhiDz1LksjeRxqa36i3l75+4iXbOy0rlDpLJGxqtgoPavQjmmyS5UJw==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@inquirer/checkbox": "^4.2.1",
"@inquirer/confirm": "^5.1.14",
@@ -2430,6 +2439,7 @@
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.16.tgz",
"integrity": "sha512-JSIeW+USuMJkkcNbiOdcPkVCeI3TSnXstIVEPpp3HiaKnPRuSbUUKm9TY9o/XpIcPHWUOQItAtC5BiAwFdVITQ==",
"license": "MIT",
"peer": true,
"dependencies": {
"file-type": "21.3.0",
"iterare": "1.2.1",
@@ -4435,6 +4445,7 @@
"resolved": "https://registry.npmjs.org/axios/-/axios-1.13.6.tgz",
"integrity": "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ==",
"license": "MIT",
"peer": true,
"dependencies": {
"follow-redirects": "^1.15.11",
"form-data": "^4.0.5",
@@ -4556,6 +4567,7 @@
}
],
"license": "MIT",
"peer": true,
"dependencies": {
"baseline-browser-mapping": "^2.9.0",
"caniuse-lite": "^1.0.30001759",
@@ -5653,6 +5665,7 @@
"integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"accepts": "^2.0.0",
"body-parser": "^2.2.1",
@@ -6120,6 +6133,7 @@
"integrity": "sha512-jq9l1DM0zVIvsm3lv9Nw9nlJnMNPOcAtsbsgiUhWcFzPE99Gvo6yRTlszSLLYacMeQ6quHD6hMfId8crVHvexw==",
"dev": true,
"license": "MIT",
"peer": true,
"engines": {
"node": ">=16.9.0"
}
@@ -6835,6 +6849,7 @@
"integrity": "sha512-SL0JY3DaxylDuo/MecFeiC+7pedM0zia33zl0vcjgwcq1q1FWWF1To9EIauPbl8GbMCU0R2e0uJ8bZunhYKD2g==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"cli-truncate": "^4.0.0",
"colorette": "^2.0.20",
@@ -8180,7 +8195,8 @@
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz",
"integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==",
"license": "Apache-2.0"
"license": "Apache-2.0",
"peer": true
},
"node_modules/require-directory": {
"version": "2.1.1",
@@ -8351,6 +8367,7 @@
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
"license": "Apache-2.0",
"peer": true,
"dependencies": {
"tslib": "^2.1.0"
}
@@ -8368,6 +8385,7 @@
"integrity": "sha512-9GUyuksjw70uNpb1MTYWsH9MQHOHY6kwfnkafC24+7aOMZn9+rVMBxRbLvw756mrBFbIsFg6Xw9IkR2Fnn3k+Q==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"chokidar": "^4.0.0",
"immutable": "^5.0.2",
@@ -8935,7 +8953,8 @@
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
"license": "0BSD"
"license": "0BSD",
"peer": true
},
"node_modules/tuf-js": {
"version": "4.1.0",
@@ -8985,6 +9004,7 @@
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"dev": true,
"license": "Apache-2.0",
"peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -9125,6 +9145,7 @@
"integrity": "sha512-uzcxnSDVjAopEUjljkWh8EIrg6tlzrjFUfMcR1EVsRDGwf/ccef0qQPRyOrROwhrTDaApueq+ja+KLPlzR/zdg==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"esbuild": "^0.25.0",
"fdir": "^6.5.0",
@@ -9424,6 +9445,7 @@
"integrity": "sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig==",
"dev": true,
"license": "MIT",
"peer": true,
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
@@ -9442,7 +9464,8 @@
"version": "0.15.1",
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.15.1.tgz",
"integrity": "sha512-XE96n56IQpJM7NAoXswY3XRLcWFW83xe0BiAOeMD7K5k5xecOeul3Qcpx6GqEeeHNkW5DWL5zOyTbEfB4eti8w==",
"license": "MIT"
"license": "MIT",
"peer": true
}
}
}
+3 -1
View File
@@ -1 +1,3 @@
<router-outlet></router-outlet>
<ion-app>
<ion-router-outlet></ion-router-outlet>
</ion-app>
+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)
},
]
}
];
+1 -2
View File
@@ -1,10 +1,9 @@
import {Component} from '@angular/core';
import {IonicModule} from "@ionic/angular";
import {RouterOutlet} from "@angular/router";
@Component({
selector: 'app-root',
imports: [IonicModule, RouterOutlet],
imports: [IonicModule],
templateUrl: './app.html',
styleUrl: './app.css'
})
@@ -0,0 +1,29 @@
<ion-app>
<ion-tabs>
<ion-router-outlet></ion-router-outlet>
<ion-tab-bar slot="bottom" style="
--background: #FFFFFF;
--color: #C0C0C0;
--color-selected: #000000;
">
<ion-tab-button tab="home" routerLink="/home">
<ion-icon name="home-outline"></ion-icon>
</ion-tab-button>
<ion-tab-button tab="groups" routerLink="/groups">
<ion-icon name="chatbubbles-outline"></ion-icon>
</ion-tab-button>
<ion-tab-button tab="ranking" routerLink="/ranking">
<ion-icon name="stats-chart-outline"></ion-icon>
</ion-tab-button>
<ion-tab-button tab="social" routerLink="/social">
<ion-icon name="people-outline"></ion-icon>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>
</ion-app>
@@ -0,0 +1,22 @@
import { Component } from '@angular/core';
import {IonicModule} from "@ionic/angular";
import {addIcons} from 'ionicons';
import {homeOutline, peopleOutline, chatbubblesOutline, statsChartOutline} from 'ionicons/icons';
addIcons({
'home-outline': homeOutline,
'people-outline': peopleOutline,
'chatbubbles-outline': chatbubblesOutline,
'stats-chart-outline': statsChartOutline
});
@Component({
selector: 'app-navbar',
templateUrl: './navbar.component.html',
styleUrls: ['./navbar.component.scss'],
imports: [
IonicModule
]
})
export class NavbarComponent {
}
@@ -1,3 +0,0 @@
<p>
groups works!
</p>
+3 -9
View File
@@ -1,16 +1,10 @@
import {Component, OnInit} from '@angular/core';
import {Component} from '@angular/core';
@Component({
selector: 'app-groups',
templateUrl: './groups.component.html',
styleUrls: ['./groups.component.scss'],
imports: []
})
export class GroupsComponent implements OnInit {
constructor() {
}
ngOnInit() {
}
export class GroupsComponent {
}
-3
View File
@@ -1,3 +0,0 @@
<p>
home works!
</p>
+2 -1
View File
@@ -1,9 +1,10 @@
import {Component, OnInit} from '@angular/core';
import {Component} from '@angular/core';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss'],
imports: []
})
export class HomeComponent {
}
@@ -1,3 +0,0 @@
<p>
ranking works!
</p>
+3 -9
View File
@@ -1,16 +1,10 @@
import {Component, OnInit} from '@angular/core';
import {Component} from '@angular/core';
@Component({
selector: 'app-ranking',
templateUrl: './ranking.component.html',
styleUrls: ['./ranking.component.scss'],
imports: []
})
export class RankingComponent implements OnInit {
constructor() {
}
ngOnInit() {
}
export class RankingComponent {
}
@@ -1,3 +0,0 @@
<p>
friends works!
</p>
+3 -8
View File
@@ -1,16 +1,11 @@
import {Component, OnInit} from '@angular/core';
import {Component} from '@angular/core';
@Component({
selector: 'app-social',
templateUrl: './social.component.html',
styleUrls: ['./social.component.scss'],
imports: []
})
export class SocialComponent implements OnInit {
constructor() {
}
ngOnInit() {
}
export class SocialComponent {
}
+1
View File
@@ -6,6 +6,7 @@
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="BeReady.png">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" rel="stylesheet">
</head>
<body>
<app-root></app-root>