官网:https://angular.io
文档:https://angular.io/docs/ts/latest/
让我们从零开始,建立在TypeScript 的基础上build angular2 app
angular2-quickstart
|—app
|— app.component.ts
|—main.ts
|—index.html
|—license.md
前提条件: 已安装nodejs
下载地址:https://nodejs.org/en/
我的是: D:\test\angular2-quickstart
angular2-quickstart->package.json
代码如下:
{
"name": "angular2-quickstart",
"version": "1.0.0",
"scripts": {
"tsc": "tsc",
"tsc:w": "tsc -w",
"lite": "lite-server",
"start": "concurrent \"npm run tsc:w\" \"npm run lite\" "
},
"license": "ISC",
"dependencies": {
"angular2": "2.0.0-beta.2",
"systemjs": "0.19.6",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.0",
"zone.js": "0.5.10"
},
"devDependencies": {
"concurrently": "^1.0.0",
"lite-server": "^1.3.4",
"typescript": "^1.7.5"
}
}
输入:
npm install