<div id="app">
<component v-bind:is="currentComponent"></component>
</div>
new Vue({
el: "#app",
name: 'root',
data: function () {
return {
currentComponent: 'game-start-view'
}
},
methods: {
getLevel() {
this.currentComponent = "game-level";
},
getGame() {
this.currentComponent = "game-agreement";
},
stopGame() {
this.currentComponent = "game-start-view";
}
}
});