Commit cca0ef2f authored by Igor Minar's avatar Igor Minar Committed by Sindre Sorhus

Close GH-205: Angularjs fixes2. Fixes #191

parent 5848399f
......@@ -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>
......
'use strict';
/**
* The main TodoMVC app module.
*
......
'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();
......
'use strict';
/**
* Directive that executes an expression when the element it is applied to loses focus.
*/
......
'use strict';
/**
* Directive that places focus on the element it is applied to when the expression it binds to evaluates to true.
*/
......
'use strict';
/**
* Services that persists and retrieves TODOs from localStorage.
*/
......
......@@ -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>
......
'use strict';
/**
* The main TodoMVC app module.
*
......
'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 = '';
};
......
'use strict';
/**
* Directive that executes an expression when the element it is applied to loses focus.
*/
......
'use strict';
/**
* Directive that places focus on the element it is applied to when the expression it binds to evaluates to true.
*/
......
'use strict';
/**
* Services that persists and retrieves TODOs from localStorage.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment