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 caf6e22..3b3f7d2 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 f8b0f1b..9f26101 100644 --- a/src/app/services/api-back.service.ts +++ b/src/app/services/api-back.service.ts @@ -71,4 +71,5 @@ export class ApiBackService { getPersonneById(id: any) { return this.httpClient.get(`${environment.apiUrl}/user/${id}`); } + }