[Vuejs]-Display birthday data of more than 1 person in modal

0👍

I think this steps will help you to solve your problem:

  1. If you want to show multiple person’s birthday, then you need the information of all persons. Create an array of persons like birthday. person:[]

  2. Create a for loop on modal.

<div class="modal fade" tabindex="-1"  id="birthdayModal" role="dialog" v-for"person in persons">
   ------
</div>
  1. If there is a birthday of a person then fire it.

0👍

I think the problem is this line:

this.birthday = result.data[0]

With this, you are always getting only one person’s data. Put your all persons data in a variable, like this.persons = result.data. Then use v-for to loop through them.

Leave a comment