In this section, we will introduce a few new Vue features that will help us build the game, such as components, props, and event emitting!
The calm before the storm
The template option
If you look in the index.html file, you will see that the #app element is already there and empty. In fact, we won't write anything inside. Instead, we will use the template option directly on the definition object. Let's try it with a dumb template:
new Vue({
name: 'game',
el: '#app',
template: `<div id="#app">
Hello world!
</div>`,
})
Here, we used the new JavaScript strings, with the ` character (back quote). It allows us, among other things, to write text spanning multiple lines,...