From 1dc4e45a24b81004daf0fb123cd092a850a17475 Mon Sep 17 00:00:00 2001
From: Cristiano Magro <cristiano.magro@vola.it>
Date: Mon, 30 Dec 2024 20:35:33 +0100
Subject: [PATCH] inject object throw component

---
 08 - component communication/cmp-communication-08-a-potential-problem-starting-setup/src/App.vue |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/08 - component communication/cmp-communication-08-a-potential-problem-starting-setup/src/App.vue b/08 - component communication/cmp-communication-08-a-potential-problem-starting-setup/src/App.vue
index 3ed01f7..e693be6 100644
--- a/08 - component communication/cmp-communication-08-a-potential-problem-starting-setup/src/App.vue
+++ b/08 - component communication/cmp-communication-08-a-potential-problem-starting-setup/src/App.vue
@@ -4,7 +4,7 @@
       :topic-title="activeTopic && activeTopic.title"
       :text="activeTopic && activeTopic.fullText"
     ></active-element>
-    <knowledge-base :topics="topics" @select-topic="activateTopic"></knowledge-base>
+    <knowledge-base @select-topic="activateTopic"></knowledge-base>
   </div>
 </template>
 
@@ -32,6 +32,25 @@
       activeTopic: null,
     };
   },
+  provide:{
+    topics: [
+        {
+          id: 'basics',
+          title: 'The Basics',
+          description: 'Core Vue basics you have to know',
+          fullText:
+            'Vue is a great framework and it has a couple of key concepts: Data binding, events, components and reactivity - that should tell you something!',
+        },
+        {
+          id: 'components',
+          title: 'Components',
+          description:
+            'Components are a core concept for building Vue UIs and apps',
+          fullText:
+            'With components, you can split logic (and markup) into separate building blocks and then combine those building blocks (and re-use them) to build powerful user interfaces.',
+        },
+      ],
+  },
   methods: {
     activateTopic(topicId) {
       this.activeTopic = this.topics.find((topic) => topic.id === topicId);

--
Gitblit v1.8.0