3 years ago

Vue 2 and "Learning Vue 1.0: Step By Step" - Updates

Posted 3 years ago by Filip_Zdravkovic

I started to watch the video course "Learning Vue 1.0: Step By Step" but I'm using Vue 2. It's probably the best resource for learning Vue :) For now, everything works fine, there are only a few changes:

VIDEO 4: A Peek into Components If you are using Vue.js 2 - you need to enclose component’s template inside a ‘div’ element:

<template id="counter-template">
                <h1>{{ subject }}</h1>
                <button @click="count++">{{ count }}</button>

Otherwise, you get the following error: [Vue warn]: Component template should contain exactly one root element...

Please sign in or create an account to participate in this conversation.