Skip to content

Commit 0665b1c

Browse files
Sunghun KimSunghun Kim
Sunghun Kim
authored and
Sunghun Kim
committedJul 31, 2015
Added more comments and removed Koreans
1 parent 2b36343 commit 0665b1c

File tree

5 files changed

+18
-15
lines changed

5 files changed

+18
-15
lines changed
 

‎js/controllers/todoCtrl.js

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ $scope.todos = $firebaseArray(query);
4242
//$scope.input.wholeMsg = '';
4343
$scope.editedTodo = null;
4444

45+
// pre-precessing for collection
4546
$scope.$watchCollection('todos', function () {
4647
var total = 0;
4748
var remaining = 0;
@@ -220,7 +221,10 @@ angular.element($window).bind("scroll", function() {
220221
$window.innerHeight + "scrollY" +
221222
$window.scrollY + "offsetHeight" + $window.document.body.offsetHeight);
222223

224+
// update the max value
223225
$scope.increaseMax();
226+
227+
// force to update the view (html)
224228
$scope.$apply();
225229
}
226230
});

‎js/dummy.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ var myApp = angular.module('myApp.services', []).
22
value('version', '0.1');
33

44
myApp.
5-
//view1의 컨트롤러
5+
//view1
66
controller('MyCtrl1', ['$scope', function($scope) {
77
$scope.test1 = 'EFG';
88
}])
99

10-
//view2의 컨트롤러
10+
//view2
1111
.controller('MyCtrl2', ['$scope', function($scope) {
1212
$scope.test2 = function() {
13-
return '안녕하세요!';
13+
return 'Hello!';
1414
};
1515
}]);
1616

‎js/filters/questionFilter.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
/**
55
* The questionFilter
6-
* Show the new questions on the top
6+
* Show the new questions on the top and show only max questions
7+
*
78
*/
8-
99
todomvc.filter('questionFilter', function () {
1010
return function (input, max) {
1111
var sorted = [];

‎readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ Unit Testing (Using Karma) - http://karma-runner.github.io/0.12/index.html
1111
sugo npm install -g karma-chrome-launcher
1212
sudo npm install -g karma-jasmine
1313

14-
E2E Testing (Usung Protractor) - http://www.protractortest.org/#/
14+
E2E Testing (Using Protractor) - http://www.protractortest.org/#/
1515
Test case: test/e2e/*
1616

1717
Run: $ protractor protractor.conf.js
1818

1919
Installation:
2020
npm install -g protractor
21-
webdriver-manager update & webdriver-manager start
21+
webdriver-manager update & webdriver-manager start

‎test/unit/dummyTest.js

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
1-
describe('서비스 단위 테스트', function() {
1+
describe('Service unit testing', function() {
22
beforeEach(module('myApp.services'));
33

4-
describe('버전 서비스 테스트', function() {
5-
it('현재 버전 반환', inject(function(version) {
4+
describe('Version testing', function() {
5+
it('current version', inject(function(version) {
66
expect(version).toEqual('0.1');
77
}));
88
});
99
});
1010

1111

1212
/* 컨트롤러 단위 테스트 */
13-
describe('controllers 단위 테스트', function(){
13+
describe('controllers unit test', function(){
1414
beforeEach(module('myApp.services'));
1515
var scope;
16-
it('MyCtrl1 컨트롤러 test1값', inject(function($rootScope, $controller) {
16+
it('MyCtrl1 controller test1', inject(function($rootScope, $controller) {
1717
scope = $rootScope.$new();
1818
var ctrl = $controller('MyCtrl1', {
1919
$scope : scope
2020
});
2121
expect(scope.test1).toBe('EFG');
2222
}));
23-
it('MyCtrl2 컨트롤러 test2값', inject(function($rootScope, $controller) {
23+
it('MyCtrl2 controller test2', inject(function($rootScope, $controller) {
2424
scope = $rootScope.$new();
2525
var ctrl = $controller('MyCtrl2', {
2626
$scope : scope
2727
});
28-
// expect(scope.test2()).toBe('안녕히계세요!!');
29-
expect(scope.test2()).toBe('안녕하세요!');
28+
expect(scope.test2()).toBe('Hello!');
3029
}));
3130

3231
it('setFirstAndRestSentence Dummy', inject(function($rootScope, $controller) {

0 commit comments

Comments
 (0)
Please sign in to comment.