diff --git a/src/app/card-resto/card-resto.component.ts b/src/app/card-resto/card-resto.component.ts index 974c93b..59750a4 100644 --- a/src/app/card-resto/card-resto.component.ts +++ b/src/app/card-resto/card-resto.component.ts @@ -35,8 +35,8 @@ export class CardRestoComponent implements OnInit { } onClickLike() { console.log('click'); - //this.isLiked = !this.isLiked; - this.clickLike.emit(this.isLiked); + this.restaurant.restauLike = !this.restaurant.restauLike; + this.clickLike.emit(this.restaurant.restauLike); } } diff --git a/src/app/pages/resto-page/resto-page.component.ts b/src/app/pages/resto-page/resto-page.component.ts index 50aaee7..05d6888 100644 --- a/src/app/pages/resto-page/resto-page.component.ts +++ b/src/app/pages/resto-page/resto-page.component.ts @@ -45,10 +45,9 @@ export class RestoPageComponent implements OnInit { } onEventLike(){ - this.apiBackService.restoLiked$.next(''); + this.apiBackService.restoLiked$.next(true); console.log(this.apiBackService.restoLiked$); - } diff --git a/src/app/services/api-back.service.ts b/src/app/services/api-back.service.ts index 659288e..7e37e82 100644 --- a/src/app/services/api-back.service.ts +++ b/src/app/services/api-back.service.ts @@ -69,4 +69,5 @@ export class ApiBackService { getPersonneById(id: any) { return this.httpClient.get(`${environment.apiUrl}/user/${id}`); } + }