Skip to content

Commit

Permalink
added v-cloak to prevent from displaying the output on page load
Browse files Browse the repository at this point in the history
  • Loading branch information
sofiane-abou-abderrahim committed Nov 8, 2023
1 parent 1fc9eef commit 9f038ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<button v-on:click="addGoal">Add Goal</button>
</div>
<ul>
<li v-for="goal in goals">{{ goal }}</li>
<li v-for="goal in goals" v-cloak>{{ goal }}</li>
</ul>
</div>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
Expand Down
9 changes: 7 additions & 2 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ body {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
}

label, input {
label,
input {
margin-bottom: 0.5rem;
display: block;
width: 100%;
Expand All @@ -37,4 +38,8 @@ li {
margin: 1rem 0;
padding: 1rem;
border: 1px solid #ccc;
}
}

[v-cloak] {
display: none;
}

0 comments on commit 9f038ba

Please sign in to comment.