add v-if to the contact details

This commit is contained in:
Andreas Zweili 2021-01-25 12:29:50 +01:00
parent 6d281326bc
commit 1c6769e900
1 changed files with 2 additions and 2 deletions

View File

@ -19,8 +19,8 @@
<ul>
<li v-for="friend in friends">
<h2>{{ friend.name }}</h2>
<button>Show Details</button>
<ul>
<button @click="toggleDetails()">Show Details</button>
<ul v-if="detailsAreVisible">
<li><strong>Phone:</strong> {{ friend.phone }}</li>
<li><strong>Email:</strong> {{ friend.email }}</li>
</ul>