???????????
????· nodejs
????· webstorm
???????????
????webstorm?д??????web???

????????html??js?????
??????????д???2??????з??????????????????html??js?????
??????????
????????????
????????е??????????angularjs?????????????????????bower??????????
????1) ???bower????????
??????webstorm??terminal????н??
????npm install bower -save
????2) ?????bower.json???
??????н??????bower.json????????????bower???????????á?
????bower init
????3) ???angular????
?????????????????angular???????????angular-mocks???
????bower install bootstrap -save
????bower install angular -save
????bower install angular-mocks -save
?????????????????
????????????????nodejs????????nodejs???????????????′???package.json?????
????1)???http-server???
????npm install http-server -save
????2)??????????
????jasmine-core:javascript??????????
????karma:???javascript???????????????е?????
????karma-chrome-launcher: ??chrome???????е?????
????karma-jasmine: jasmine-core??karma?е?????????
????karma-junit-reporter: ????junit???棻
????protractor:E2E??????
?????????????
????????node???????????package.json??????script???dependencies?ж?????????????script????start??????????????????test?????????????潲??
"name": "angularjs-test"??
"version": "0.0.1"??
"dependencies": {
"bower": "^1.7.7"??
"http-server": "^0.9.0"??
"jasmine-core": "^2.4.1"??
"karma": "^0.13.22"??
"karma-chrome-launcher": "^0.2.3"??
"karma-jasmine": "^0.3.8"??
"karma-junit-reporter": "^0.4.1"??
"protractor": "^3.2.1"
}??
"scripts": {
"postinstall": "bower install"??
"prestart": "npm install"??
"start": "http-server -a localhost -p 8000 -c-1"??
"pretest": "npm install"??
"test": "karma start karma.conf.js"??
"test-single-run": "karma start karma.conf.js  --single-run"
}
???????ú???????????????????????????????http://localhost:8000
????npm start
??????????????
??????д???????
?????????js?????js???index.js????index.js?ж???congroller????????????add??????????:
/**
* Created by stephen on 2016/3/24.
*/
(function (angular) {
angular.module('app'?? []).
controller('indexCtrl'?? function ($scope) {
$scope.add = function (a?? b) {
if(a&&b)
return Number(a) + Number(b)
return 0;
}
});
})(window.angular);