Front-end

Hiding elements until the Vue instance is ready (v-cloak directive)

March 13, 2017 by
Part 19 of 55 in the Vue.js: From Beginner to Professional series

Since we’re on the subject of showing and hiding elements, let’s see how we can hide the string interpolation syntax that appears on the page until Vue.js is bootstrapped. Since the string interpolation syntax is simply a part of the HTML as normal text, the browser will render it as such. It will then be… read more

Conditionally Rendering Elements (v-if, v-else-if, and v-else directives)

February 27, 2017 by
Part 17 of 55 in the Vue.js: From Beginner to Professional series

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