[Vuejs]-Issues with data bind in vue.js and events

0๐Ÿ‘

โœ…

I figured out how to get the details to show when clicking on the note, for now I created a button in the notepad-content section:

<button class="readNoteButton" @click="readNote">view note one</button> 

and changed the section with the show note component to:

  <section v-if="readingNote === true" class="">
    <show-note
      @open-note="openNote"
      v-for="note in notes"
      :key="note.id"
      :note="note"
    ></show-note>
  </section>

issue I have now is figuring out how to get the details to show separately pertaining to each individual button

0๐Ÿ‘

In your NoteList.vue you are emitting the event "open-note". But this event is never catched in your parent component named App.vue. You have to bind this event in order to get notified when ever you clicked on a note entry. Something like @open-note="openNote".

Leave a comment