Articles
Latest
More
Newsletter Sponsorship Discord About
Sign up for our Newsletter
The video for this lesson is currently being updated, please read the transcript instead.
Build Your First Vue.js App > Lesson 17

Conditionally hiding elements

Looking at the completed version of the store, there's a pretty cool feature in here, where if the shopping cart is empty, it says no items in the cart.

Then, when we add an item to the cart, that text disappears and instead we see the content of the cart, and the total.

In this video, we'll learn about the v-if directive and use it to create that feature.

Cart markup


Back to course page

Click to load comments...

Articles
  • Latest
Newsletter
  • Join
  • Sponsorship
More
  • Discord
  • Vue.js jobs
  • About

Vue.js Developers © 2021. View our privacy policy .

  • RSS
  • |
  • Atom