Mount point: The dom node where the id corresponding to the el attribute in the vue instance is located
Template: Refers to the content
template inside the mount point,
which can be written inside the mount point or in the attribute
demo
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title> vue entry </ title> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script> </head> <body> <div id="first"> </div> <script> new View({ //Binding the above id el refers to which dom node the vue instance is bound to el:"#first", template:'<h1>hello{{msg}}</h1>', data:{ msg:"world" } }) </script> </body> </html>
Effect:
2018-05-01 11:20:11