vuejs2 - Simple vue app doesn't show anything -


full code: https://github.com/kenpeter/test_vue_template

git clone https://github.com/kenpeter/test_vue_template  

install: yarn install

run: yarn dev

visit localhost:8080 , see nothing

because didn't render in root component.

in index.html, render app component:

<div id="app">   <app></app> </div> 

there several ways this. if don't want touch index.html, can modify main.js. of code below should work:

new vue({   el: '#app',   render: h => h(app),   components: {     app   } }) 

or

new vue({   el: '#app',   template: '<app/>',   components: {     app   } }) 

Comments