angular.js官方文档的一些说明

由于angular-phonecat那个项目更新了,中文翻译资料很多还是之前版本的,用起来会有问题,自己也碰到一些坑,在此说明下。

windows

1:node.js官网下载node的安装包.http://nodejs.org/dist/v0.12.2/node-v0.12.2-x86.msi

2:下载安装git,windows客户端。http://git-scm.com/download/win

3:clone实例代码

地址(可以直接下载):https://github.com/angular/angular-phonecat

git clone --depth=14 https://github.com/angular/angular-phonecat.git

4:切换到实例代码根目录

5:下载依赖工具

npm install

6:启动项目,在当前运行。npm start

npm start //启动项目,取消了使用node scripts/web-server.js方式

Linux(以ubuntu为例)

1:安装nodejs

# apt-get install -y python-software-properties software-properties-common  
# add-apt-repository ppa:chris-lea/node.js  
# apt-get update  
# apt-get install nodejs  

2:安装git,来自http://bohsu.blog.51cto.com/6966437/1230705

3:clone远程代码
地址(可以直接下载解压):https://github.com/angular/angular-phonecat

git clone --depth=14 https://github.com/angular/angular-phonecat.git

4:切换到根目录

cd angular-phonecat

5:安装依赖工具

npm install

/×
会让你选择安装一些工具
Bower - 客户端代码管理
Http-Server - 静态资源服务器
Karma - 单元测试工具
Protractor - 端到端测试
×/

6:启动

npm start // start a local development web-server
npm test // start the Karma unit test runner
npm run protractor // run the Protractor end to end (E2E) tests
npm run update-webdriver // install the drivers needed by Protractor

主要来源于https://docs.angularjs.org/tutorial/,需翻强

分享些angular资料

https://docs.angularjs.org/tutorial/
https://github.com/jmcunningham/AngularJS-Learning
http://elvestar.com/notes/angularjs/
http://www.ngnice.com/showcase/#/home/home

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章