08 - component communication/cmp-communication-08-a-potential-problem-starting-setup/src/components/KnowledgeElement.vue
@@ -2,12 +2,13 @@ <li> <h3>{{ topicName }}</h3> <p>{{ description }}</p> <button @click="$emit('select-topic', id)">Learn More</button> <button @click="selectTopic(id)">Learn More</button> </li> </template> <script> export default { inject: ['selectTopic'], props: ['id', 'topicName', 'description'], emits: ['select-topic'], };