Is there a more clear way to write out multiple functions that are part of an object?

Posted by Gemma on Stack Overflow See other posts from Stack Overflow or by Gemma
Published on 2013-06-30T09:24:31Z Indexed on 2013/06/30 10:21 UTC
Read the original article Hit count: 344

Filed under:

I have the following:

   $scope.modalReset = function () {
        gridService.modalReset($scope);
    }

    $scope.rowAction = function (action, row) {
        gridService.rowAction(action, $scope, row, 'Question');
    }

    $scope.submitItem = function (formData) {
        gridService.submitItem($scope, 'Question', formData);
    }

Is there a way that these function calls could be written more simply. I am not looking to combine them. There are all functions that are part of the scope object.

© Stack Overflow or respective owner

Related posts about JavaScript