日期:2014-05-16  浏览次数:20371 次

AngularJS(1)Introduction and Follow PhoneCat Demo

AngularJS(1)Introduction and Follow PhoneCat Demo

1. Build and Prepare
I can get the resource from here
>git clone?https://github.com/angular/angular.js.git
>cd angular.js
>npm install
This will install all the packages we need.

I may already have grunt-cli
>sudo npm install -g grunt-cli

Build the Angular
>grunt package

Start the web Server
>grunt webserver
Visit http://localhost:8000 to verify.

The Unit Test Suite is written with Jasmine and executed with Karma
>grunt test:unit

Specify the browsers
>grunt test:unit --browsers Opera,Firefox?

Run the command?
>grunt autotest:jqlite

Just modify the source, the auto test will happen itself.

And for more information
>grunt --help

Running the end-to-end Test Suite
>grunt webserver
>grunt test:end2end
or
>grunt test:e2e
or
Visit http://localhost:8000/build/docs/docs-scenario.html

2. First Step of Angular
First Example