Vue介绍Hello world

MVVM思想:view—viewmodel–model,view与model的数据通过viewmodel实现了数据的双向绑定.

vue是基于node.js框架,很好的实现了mvvm,是一种轻量级的渐进式框架,
示例:helloworld
新建项目文件夹例如vueTest,使用vscode打开文件夹.
终端输入命令:
npm init -y 初始化
npm install vue 安装vue

PS C:\Users\Administrator\Desktop\vue01> npm  init -y
Wrote to C:\Users\Administrator\Desktop\vue01\package.json:

{
  "name": "vue01",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}


PS C:\Users\Administrator\Desktop\vue01> npm install vue
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

+ [email protected]
added 1 package from 1 contributor in 0.907s

现在vue就安装完成了,在项目下创建index.html文件,使用vue测试一下.




    
    
    
    Document


    

{ {name}} Hello world

你可能感兴趣的:(前端开发)