Install node. js just follow the steps to get started.
- First step: Download install node. js and add the program path to the environment variable in path
- Step two: Download git version control software
- Step three: Click Git-bash.exe in the git directory to execute git clone git://github.com/angular/angular-phonecat.git
- Fourth step: After getting finished, execute CD angular-phonecat switch to the PHONECAT project directory
- Fifth step: Git checkout-f step-0 switch to Project step
- Sixth step: NPM start Startup Project. PS: First install Bower,karma (test program), start the Web server in the Address bar Input localhost:8000/app/index.html View project effect
Note:
Node Scripts/web-server.js run Error:
Some of the documents have node Http-server or node scripts/web-server.js to start the Phonecat project. Find scripts does not see the Web-server.js file, which is an older version of the document, and now Phonecat Project uses NPM start to install dependent tools and start Web services.
Unable to start end-to-end testing
This problem was trapped for a long time, then also follow the steps, that is, there is no way to run end-to-end testing, search for this error type of solution, the approximate change method is to modify the Test/protractor-conf.js file;
Method 1: Change the chromeonly:true into Chromeonly:false;
Method 2: Change the port, if you cannot preview it, see if the port is occupied, or modify the port number (in the Angularjs-phonecat directory, modify the "start" in the Package.json file: "Http-server-a 0.0.0.0-p 8000 ", modify 8000 for other ports)
Method 3: In the case of these modifications are used, like in my picture of the kind of error, modify Chromeonly:true to Directconnect:true; This method is suitable for my error, finally can run NPM run protractor 、、、、、、、 Reference Document Http://pr8x.com/st/questions/31732904/trying-to-run-protractor-in-step-3-in-angular-js-tutorial.html
For starting the Phonecat project, refer to another blog post http://www.cnblogs.com/zhang-jian/p/5035424.html
Spend all your time on learning angularjs, rather than letting these mistakes haunt us. To study together with you.
AngularJS Configuring and running Phonecat errors