From 776ad68f873653d6ac358465dc777948bf4ae4a7 Mon Sep 17 00:00:00 2001 From: francesco Date: Tue, 14 Dec 2021 11:34:32 +0100 Subject: [PATCH] Passing Recipe Data with property binding --- project/src/app/app.component.html | 6 +++--- project/src/app/app.component.ts | 5 +++++ project/src/app/header/header.component.html | 4 ++-- project/src/app/header/header.component.ts | 10 +++++----- .../recipe-item/recipe-item.component.html | 18 ++++++++++++++--- .../recipe-item/recipe-item.component.ts | 4 +++- .../recipe-list/recipe-list.component.html | 20 +++---------------- 7 files changed, 36 insertions(+), 31 deletions(-) diff --git a/project/src/app/app.component.html b/project/src/app/app.component.html index e6bcc99..dab2166 100644 --- a/project/src/app/app.component.html +++ b/project/src/app/app.component.html @@ -1,9 +1,9 @@ - +
- - + +
\ No newline at end of file diff --git a/project/src/app/app.component.ts b/project/src/app/app.component.ts index 7513378..06499a0 100644 --- a/project/src/app/app.component.ts +++ b/project/src/app/app.component.ts @@ -7,4 +7,9 @@ import { Component } from '@angular/core'; }) export class AppComponent { title = 'project'; + loadedFeature = 'recipe'; + + onNavgate(feature: string) { + this.loadedFeature = feature; + } } diff --git a/project/src/app/header/header.component.html b/project/src/app/header/header.component.html index bf6adff..9c8ddbc 100644 --- a/project/src/app/header/header.component.html +++ b/project/src/app/header/header.component.html @@ -5,8 +5,8 @@