The video for this lesson is currently being updated, please read the transcript instead.

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

To view the complete lesson you'll need to login or join this course.


Click to load comments...