The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Conditionally Render DOM Elements in Vue.js

Conditionally Render DOM Elements in Vue.js

1:01
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.
Watch this lesson now
Avatar
egghead.io

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.

Avatar
marushkevych

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

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?