Commit ee1887e2 authored by Sam Saccone's avatar Sam Saccone

typescript-angular: Update compilation

parent 9b444299
...@@ -44,9 +44,7 @@ var todos; ...@@ -44,9 +44,7 @@ var todos;
function todoBlur() { function todoBlur() {
return { return {
link: function ($scope, element, attributes) { link: function ($scope, element, attributes) {
element.bind('blur', function () { element.bind('blur', function () { $scope.$apply(attributes.todoBlur); });
$scope.$apply(attributes.todoBlur);
});
} }
}; };
} }
...@@ -54,7 +52,7 @@ var todos; ...@@ -54,7 +52,7 @@ var todos;
})(todos || (todos = {})); })(todos || (todos = {}));
/// <reference path='../_all.ts' /> /// <reference path='../_all.ts' />
var todos; var todos;
(function (_todos) { (function (todos_1) {
'use strict'; 'use strict';
/** /**
* Services that persists and retrieves TODOs from localStorage. * Services that persists and retrieves TODOs from localStorage.
...@@ -71,7 +69,7 @@ var todos; ...@@ -71,7 +69,7 @@ var todos;
}; };
return TodoStorage; return TodoStorage;
})(); })();
_todos.TodoStorage = TodoStorage; todos_1.TodoStorage = TodoStorage;
})(todos || (todos = {})); })(todos || (todos = {}));
/// <reference path='../_all.ts' /> /// <reference path='../_all.ts' />
var todos; var todos;
...@@ -106,7 +104,9 @@ var todos; ...@@ -106,7 +104,9 @@ var todos;
$scope.location = $location; $scope.location = $location;
} }
TodoCtrl.prototype.onPath = function (path) { TodoCtrl.prototype.onPath = function (path) {
this.$scope.statusFilter = (path === '/active') ? { completed: false } : (path === '/completed') ? { completed: true } : null; this.$scope.statusFilter = (path === '/active') ?
{ completed: false } : (path === '/completed') ?
{ completed: true } : null;
}; };
TodoCtrl.prototype.onTodos = function () { TodoCtrl.prototype.onTodos = function () {
this.$scope.remainingCount = this.filterFilter(this.todos, { completed: false }).length; this.$scope.remainingCount = this.filterFilter(this.todos, { completed: false }).length;
...@@ -139,9 +139,7 @@ var todos; ...@@ -139,9 +139,7 @@ var todos;
this.$scope.todos = this.todos = this.todos.filter(function (todoItem) { return !todoItem.completed; }); this.$scope.todos = this.todos = this.todos.filter(function (todoItem) { return !todoItem.completed; });
}; };
TodoCtrl.prototype.markAll = function (completed) { TodoCtrl.prototype.markAll = function (completed) {
this.todos.forEach(function (todoItem) { this.todos.forEach(function (todoItem) { todoItem.completed = completed; });
todoItem.completed = completed;
});
}; };
// $inject annotation. // $inject annotation.
// It provides $injector with information about dependencies to be injected into constructor // It provides $injector with information about dependencies to be injected into constructor
...@@ -166,6 +164,20 @@ var todos; ...@@ -166,6 +164,20 @@ var todos;
var todos; var todos;
(function (todos) { (function (todos) {
'use strict'; 'use strict';
var todomvc = angular.module('todomvc', []).controller('todoCtrl', todos.TodoCtrl).directive('todoBlur', todos.todoBlur).directive('todoFocus', todos.todoFocus).service('todoStorage', todos.TodoStorage); var todomvc = angular.module('todomvc', [])
.controller('todoCtrl', todos.TodoCtrl)
.directive('todoBlur', todos.todoBlur)
.directive('todoFocus', todos.todoFocus)
.service('todoStorage', todos.TodoStorage);
})(todos || (todos = {})); })(todos || (todos = {}));
/// <reference path='libs/jquery/jquery.d.ts' />
/// <reference path='libs/angular/angular.d.ts' />
/// <reference path='models/TodoItem.ts' />
/// <reference path='interfaces/ITodoScope.ts' />
/// <reference path='interfaces/ITodoStorage.ts' />
/// <reference path='directives/TodoFocus.ts' />
/// <reference path='directives/TodoBlur.ts' />
/// <reference path='services/TodoStorage.ts' />
/// <reference path='controllers/TodoCtrl.ts' />
/// <reference path='Application.ts' />
//# sourceMappingURL=Application.js.map //# sourceMappingURL=Application.js.map
\ No newline at end of file
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