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 @@