angularJs的学习笔记,记录一下,额外学习,不用到项目中,怕之后忘了。html
参考地址:http://www.ituring.com.cn/article/13473 改地址比较老了 建议多看看评论 英文好的能够看看这个 https://docs.angularjs.org/tutorialnode
1.搭建学习环境git
本人用的Mac mini,根据参考地址学习angularJS,须要安装node和Testacularangularjs
a.安装nodegithub
终端中:npm
git clone git://github.com/joyent/node.git cd node ./configure make sudo make install
安装成功浏览器
dzuketomoheitekiMac-mini:node fuyouping$ node --version v0.13.0-pre
而后安装Testacular单元测试程序,请运行以下命令:testacular也更名karma了,npm install -g testacular应该改成 npm install karmaapp
npm install karma
安装Git工具,而后用如下命令从Github复制本教程项目的源代码文件工具
git clone git://github.com/angular/angular-phonecat.git
哎 那个地址是个坑 我删除从新来 rm -rf angularJS单元测试
1.下载angular-phonecat
git clone --depth=14 https://github.com/angular/angular-phonecat.git
The --depth=14 option just tells Git to pull down only the last 14 commits. This makes the download much smaller and faster. 意思大概是 获取最后14次的提交 这样下载更快文件更小
进入angular-phonecat
cd angular-phonecat/
2.安装node,上面已经有了
node --version 或者 node -v 查看node的版本 这里更方便
apt-get install nodejs-legacy npm
若是没安装npm 使用 install npm
3.运行 npm start 而后再浏览器访问
http://localhost:8000/app/index.html
新手学习,不少地方有错,谢谢。