récupère les ID des produits dans la page détail
This commit is contained in:
parent
b81ebb7d89
commit
a24530e005
@ -1,13 +1,16 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
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 { PageAccueilComponent } from './pages/page-accueil/page-accueil.component';
|
||||||
import { PageDetailsComponent } from './pages/page-details/page-details.component';
|
import { PageDetailsComponent } from './pages/page-details/page-details.component';
|
||||||
import { PageNotFoundComponent } from './pages/page-not-found/page-not-found.component';
|
import { PageNotFoundComponent } from './pages/page-not-found/page-not-found.component';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', redirectTo: 'home', pathMatch: 'full' },
|
{ path: '', redirectTo: 'home', pathMatch: 'full' },
|
||||||
{ path: 'home', component: PageAccueilComponent },
|
{ path: 'home', component: PageAccueilComponent },
|
||||||
{ path: 'details', component: PageDetailsComponent },
|
{ path: 'details/:productId', component: CardPlanteComponent },
|
||||||
{ path: '**', component: PageNotFoundComponent }
|
{ path: '**', component: PageNotFoundComponent }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col" *ngFor="let product of listData">
|
<div class="col" *ngFor="let product of listData">
|
||||||
<app-card-plante [plant]="product"
|
<app-card-plante [plant]="product"
|
||||||
|
[routerLink]="['/details/:productId']"
|
||||||
(clickLike)="onEventLike()">
|
(clickLike)="onEventLike()">
|
||||||
</app-card-plante>
|
</app-card-plante>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user