Commit 37654081 authored by Sam Saccone's avatar Sam Saccone
parent c947f59e
...@@ -23,10 +23,9 @@ angular.module('todomvc') ...@@ -23,10 +23,9 @@ angular.module('todomvc')
// Monitor the current route for changes and adjust the filter accordingly. // Monitor the current route for changes and adjust the filter accordingly.
$scope.$on('$routeChangeSuccess', function () { $scope.$on('$routeChangeSuccess', function () {
var status = $scope.status = $routeParams.status || ''; var status = $scope.status = $routeParams.status || '';
$scope.statusFilter = (status === 'active') ? $scope.statusFilter = (status === 'active') ?
{ completed: false } : (status === 'completed') ? { completed: false } : (status === 'completed') ?
{ completed: true } : null; { completed: true } : {};
}); });
$scope.addTodo = function () { $scope.addTodo = function () {
......
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