Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Angularjs fixes2 #205

Closed
wants to merge 3 commits into from

2 participants

@IgorMinar

some additional fixes that I missed in #191

IgorMinar added some commits
@IgorMinar IgorMinar AngularJS: fix comment + credits 3003cec
@IgorMinar IgorMinar AngularJS: add 'use strict' 5fb2004
@IgorMinar IgorMinar AngularJS: use $scope instead of this
It's uncommon in angular code to use this as it creates confusion about
what  in the currect context really is, $scope is very explicit.
a2766ed
@gustaff-weldon gustaff-weldon referenced this pull request from a commit in gustaff-weldon/todomvc
@IgorMinar IgorMinar Close GH-205: Angularjs fixes2. Fixes #191 0f87bd2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 3, 2012
  1. @IgorMinar
  2. @IgorMinar

    AngularJS: add 'use strict'

    IgorMinar authored
  3. @IgorMinar

    AngularJS: use $scope instead of this

    IgorMinar authored
    It's uncommon in angular code to use this as it creates confusion about
    what  in the currect context really is, $scope is very explicit.
This page is out of date. Refresh to see the latest.
View
7 architecture-examples/angularjs-perf/index.html
@@ -55,7 +55,12 @@
</section>
<footer id="info">
<p>Double-click to edit a todo.</p>
- <p>Credits: <a href="http://twitter.com/cburgdorf">Christoph Burgdorf</a>, <a href="http://ericbidelman.com">Eric Bidelman</a>, <a href="http://jacobmumm.com">Jacob Mumm</a></p>
+ <p>Credits:
+ <a href="http://twitter.com/cburgdorf">Christoph Burgdorf</a>,
+ <a href="http://ericbidelman.com">Eric Bidelman</a>,
+ <a href="http://jacobmumm.com">Jacob Mumm</a> and
+ <a href="http://igorminar.com">Igor Minar</a>
+ </p>
</footer>
<script src="../../assets/base.js"></script>
<script src="js/libs/angular/angular.min.js"></script>
View
2  architecture-examples/angularjs-perf/js/app.js
@@ -1,3 +1,5 @@
+'use strict';
+
/**
* The main TodoMVC app module.
*
View
5 architecture-examples/angularjs-perf/js/controllers/todoCtrl.js
@@ -1,8 +1,9 @@
+'use strict';
+
/**
* The main controller for the app. The controller:
* - retrieves and persist the model via the todoStorage service
- * -
- * exposes the model to the template and
+ * - exposes the model to the template and provides event handlers
*/
todomvc.controller( 'TodoCtrl', function TodoCtrl( $scope, $location, todoStorage, filterFilter ) {
var todos = $scope.todos = todoStorage.get();
View
2  architecture-examples/angularjs-perf/js/directives/todoBlur.js
@@ -1,3 +1,5 @@
+'use strict';
+
/**
* Directive that executes an expression when the element it is applied to loses focus.
*/
View
2  architecture-examples/angularjs-perf/js/directives/todoFocus.js
@@ -1,3 +1,5 @@
+'use strict';
+
/**
* Directive that places focus on the element it is applied to when the expression it binds to evaluates to true.
*/
View
2  architecture-examples/angularjs-perf/js/services/todoStorage.js
@@ -1,3 +1,5 @@
+'use strict';
+
/**
* Services that persists and retrieves TODOs from localStorage.
*/
View
7 architecture-examples/angularjs/index.html
@@ -55,7 +55,12 @@
</section>
<footer id="info">
<p>Double-click to edit a todo.</p>
- <p>Credits: <a href="http://twitter.com/cburgdorf">Christoph Burgdorf</a>, <a href="http://ericbidelman.com">Eric Bidelman</a>, <a href="http://jacobmumm.com">Jacob Mumm</a></p>
+ <p>Credits:
+ <a href="http://twitter.com/cburgdorf">Christoph Burgdorf</a>,
+ <a href="http://ericbidelman.com">Eric Bidelman</a>,
+ <a href="http://jacobmumm.com">Jacob Mumm</a> and
+ <a href="http://igorminar.com">Igor Minar</a>
+ </p>
</footer>
<script src="../../assets/base.js"></script>
<script src="js/libs/angular/angular.min.js"></script>
View
2  architecture-examples/angularjs/js/app.js
@@ -1,3 +1,5 @@
+'use strict';
+
/**
* The main TodoMVC app module.
*
View
9 architecture-examples/angularjs/js/controllers/todoCtrl.js
@@ -1,8 +1,9 @@
+'use strict';
+
/**
* The main controller for the app. The controller:
* - retrieves and persist the model via the todoStorage service
- * -
- * exposes the model to the template and
+ * - exposes the model to the template and provides event handlers
*/
todomvc.controller( 'TodoCtrl', function TodoCtrl( $scope, $location, todoStorage, filterFilter ) {
var todos = $scope.todos = todoStorage.get();
@@ -33,11 +34,11 @@ todomvc.controller( 'TodoCtrl', function TodoCtrl( $scope, $location, todoStorag
}
todos.push({
- title: this.newTodo,
+ title: $scope.newTodo,
completed: false
});
- this.newTodo = '';
+ $scope.newTodo = '';
};
View
2  architecture-examples/angularjs/js/directives/todoBlur.js
@@ -1,3 +1,5 @@
+'use strict';
+
/**
* Directive that executes an expression when the element it is applied to loses focus.
*/
View
2  architecture-examples/angularjs/js/directives/todoFocus.js
@@ -1,3 +1,5 @@
+'use strict';
+
/**
* Directive that places focus on the element it is applied to when the expression it binds to evaluates to true.
*/
View
2  architecture-examples/angularjs/js/services/todoStorage.js
@@ -1,3 +1,5 @@
+'use strict';
+
/**
* Services that persists and retrieves TODOs from localStorage.
*/
Something went wrong with that request. Please try again.