Let’s start with the vue.js file
Code:
<div id="#app"> {{name}} // View area </div> <script> // in new Vue"v"Var vm=new Vue({el:) {//vm =new Vue({el:);"#app"/ / ("el"All nodes are spelled as"element"Div (id = app) data:{name:"kgc"}}) </script>Copy the code
Writing order: write the code in JS first, then write the code in HTML