Conditionally Render DOM Elements in Vue.js

Greg Thoman
InstructorGreg Thoman

Share this video with your friends

Send Tweet

You can use v-if and v-else to display content based on assertions on your data. Similarly, v-show can be used to render the content, but hide it with css. v-if can also be used on an invisible wrapper <template> element.

~ 4 years ago

removeItem is invalid - it passes the event to splice, so it always deletes first item