From a24530e005104054fc67625f214451b75d8d74d9 Mon Sep 17 00:00:00 2001 From: HarmandI Date: Mon, 17 Jan 2022 18:20:39 +0100 Subject: [PATCH] =?UTF-8?q?r=C3=A9cup=C3=A8re=20les=20ID=20=20des=20produi?= =?UTF-8?q?ts=20dans=20la=20page=20d=C3=A9tail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app-routing.module.ts | 5 ++++- src/app/pages/page-accueil/page-accueil.component.html | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index fddb815..529a565 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,13 +1,16 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; +import { CardPlanteComponent } from './components/card-plante/card-plante.component'; import { PageAccueilComponent } from './pages/page-accueil/page-accueil.component'; import { PageDetailsComponent } from './pages/page-details/page-details.component'; import { PageNotFoundComponent } from './pages/page-not-found/page-not-found.component'; + + const routes: Routes = [ { path: '', redirectTo: 'home', pathMatch: 'full' }, { path: 'home', component: PageAccueilComponent }, - { path: 'details', component: PageDetailsComponent }, + { path: 'details/:productId', component: CardPlanteComponent }, { path: '**', component: PageNotFoundComponent } ]; diff --git a/src/app/pages/page-accueil/page-accueil.component.html b/src/app/pages/page-accueil/page-accueil.component.html index 86cdb66..3adf40d 100644 --- a/src/app/pages/page-accueil/page-accueil.component.html +++ b/src/app/pages/page-accueil/page-accueil.component.html @@ -17,6 +17,7 @@