app/todo/todo.controller.js
function add() {
            vm.error = undefined;
            service.add({
                description: vm.description
            }, function() {
                _fetch();
            }, function() {
                vm.error = 'An error occurred when adding a todo';
            });
            vm.description = '';
        }
function add() {
            vm.error = undefined;
            service.add({
                description: vm.description
            }, function() {
                _fetch();
            }, function() {
                vm.error = 'An error occurred when adding a todo';
            });
            vm.description = '';
        }
function add ( ) { vm . error = undefined ; service . add ( { description : vm . description } , function ( ) { _fetch ( ) ; } , function ( ) { vm . error = 'An error occurred when adding a todo' ; } ) ; vm . description = '' ; }
Add the given todo.
@param todo The todo
Add the given todo .