search

Home  >  Q&A  >  body text

Template problem in vue-cli - Stack Overflow

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

仅有的幸福仅有的幸福2741 days ago536

reply all(2)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-19 10:37:42

    https://www.mmxiaowu.com/arti...

    reply
    0
  • 迷茫

    迷茫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

    reply
    0
  • Cancelreply