Yesterday with Vue's official website to build a Vue scaffolding, I was the first time with Vue all in the groping stage.
Today, try to see what's inside the scaffold.
First look at Main.js.
3 Modules imported a Vue, an app, and a router.
Vue. Config. Productiontip = false turn off the hints given in production mode
and then what do the following do?
New Vue ({ ' #app ', router, ' <App/> ', components : {app}})
here, I found some explanations for the Vue website.What is a component?
Component (Component) is one of the most powerful features of Vue.js. Components can extend HTML elements to encapsulate reusable code. At a higher level, the component is a custom element, and the compiler for Vue.js adds special functionality to it. In some cases, a component can also be the form of a native HTML element, extended with the IS attribute.
That would probably understand main.js.
A new instance has been created
New Vue ({ ' #app ',
Provides mount element router,
//Routing ' <App/> ',
Template Components : {APP}
Component})
Developing an app with Vue (2,main.js)