Source:transaction.js

/**
 * @ngdoc controller
 * @name transactionCtrl
 * @description Handles All transactions
 * @param {service} $scope
 * @param {service} Requests
 */
app.controller('transactionCtrl', ['$scope', 'Requests', function(scope,
  Requests) {
  scope.transaction = {};
  /**
   * function add
   * @description Add a New Transaction
   */
  scope.add = function add() {
    var transaction = scope.transaction;
    Requests.post('url', transaction, function(data) {
    });
  }
}]);