récupère les ID des produits dans la page détail

This commit is contained in:
HarmandI 2022-01-17 18:20:39 +01:00
parent b81ebb7d89
commit a24530e005
2 changed files with 5 additions and 1 deletions

View File

@ -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 }
];

View File

@ -17,6 +17,7 @@
<div class="row">
<div class="col" *ngFor="let product of listData">
<app-card-plante [plant]="product"
[routerLink]="['/details/:productId']"
(clickLike)="onEventLike()">
</app-card-plante>
</div>