filtres prix = ok
This commit is contained in:
parent
a6d96e2280
commit
2170ef0f65
6 changed files with 165 additions and 129 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ApiBackService } from '../services/api-back.service';
|
||||
|
||||
@Component({
|
||||
|
|
@ -11,19 +11,17 @@ export class CardCategoryComponent implements OnInit {
|
|||
|
||||
@Input() categoryData : any;
|
||||
|
||||
constructor(private apiBackService : ApiBackService, private route : Router) { }
|
||||
constructor(private apiBackService : ApiBackService, private route : Router, private activatedRoute : ActivatedRoute) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
onClickCateg(id : number){
|
||||
|
||||
|
||||
this.apiBackService.getRestaurantsByCateg(id);
|
||||
this.apiBackService.getRestaurantsByCateg(id , this.activatedRoute.snapshot.routeConfig?.path);
|
||||
// on fait passer en second parametre le path de la route c'est a dire "home"(pour l'instant)
|
||||
|
||||
this.route.navigate(['restaurants']);
|
||||
|
||||
//console.log('salut les copains');
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue