In main.js generated with vue-cli tool
import Vue from 'vue'
import App from './App'
import router from './router'
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
template: '<App/>',
components: { App }
})
[template: '<App/>']What does this sentence mean?
Does it mean using the app.vue template? But I haven’t seen such usage in vue!
There are only:
1 template:'#xxx' Get based on id
2 template:'<xx>...<xx>' Use it directly
Is there any related one? What about the documentation? Thanks
迷茫2017-05-19 10:37:42
I have answered the answer myself!
The second template:'<xx>....<xx>', <App/> --> <App></App> is just a component?
Attachment: import App from './App' The App component is imported from here