Conditionally Rendering Elements (v-if, v-else-if, and v-else directives)
Until now, our templates haven’t supported dynamically rendering elements based on boolean conditions. That’s about to change, as we will talk about three directives in this lecture; v-if, v-else-if, and v-else. The names of these directives should pretty self-explanatory, so let’s dive straight into an example. Suppose that we have a webshop and we want… read more