app/todo/todo.controller.js
function _archive(todo) {
            var deferred = $q.defer();
            service.archive(todo, function () {
                return deferred.resolve();
            }, function () {
                return deferred.reject();
            });
            return deferred.promise;
        }
function _archive(todo) {
            var deferred = $q.defer();
            service.archive(todo, function () {
                return deferred.resolve();
            }, function () {
                return deferred.reject();
            });
            return deferred.promise;
        }
function _archive ( todo ) { var deferred = $q . defer ( ) ; service . archive ( todo , function ( ) { return deferred . resolve ( ) ; } , function ( ) { return deferred . reject ( ) ; } ) ; return deferred . promise ; }
Archive the given todo.
@param todo The todo.
@private
Archive the given todo .