angularJs的學習筆記

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

新手學習,不少地方有錯,謝謝。

相關文章
相關標籤/搜索