app/todo/todo.controller.js
function complete(todo) {
            vm.error = undefined;
            service.complete(todo, function() {
                _fetch();
            }, function() {
                vm.error = 'An error occurred when completing a todo';
            });
        }
function complete(todo) {
            vm.error = undefined;
            service.complete(todo, function() {
                _fetch();
            }, function() {
                vm.error = 'An error occurred when completing a todo';
            });
        }
function complete ( todo ) { vm . error = undefined ; service . complete ( todo , function ( ) { _fetch ( ) ; } , function ( ) { vm . error = 'An error occurred when completing a todo' ; } ) ; }
Complete the given todo.
@param todo The todo
Complete the given todo .