1

i want to push newUsers into an array and then display that array , newUsers will be an html code with informations and whenever someone enter his informations and click 'Add' an html code will be push into users array ,but the problem is that 'v-html' is not reading the code probably because when i right the code manually i get different display results check it out : https://codesandbox.io/s/3r3po83rkp

1 Answer 1

1

The problem with your v-html is that you are trying to display the array itself and not the items in it.

Change this:

<div class="req"><span v-html="Users"></span></div>

To:

<div class="req" v-for="(user, index) in Users"><span :key="index" v-html="user"></span></div>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.