code maintenance

This commit is contained in:
2016-03-08 22:37:22 +01:00
parent 70d6b42539
commit 542d54e420
2 changed files with 2 additions and 27 deletions
+1 -18
View File
@@ -44,14 +44,6 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location'
$scope.postTransaction = function() {
console.log('postTransaction()');
// simple HTTP POST
// $http.post('/transactions', { "amount" : $scope.amount /* date, */ }).success(function() {
// console.log('REFRESH');
// $scope.initList();
// });
// via Resource (might be moved into a service)
var Transaction = $resource('/transactions');
@@ -64,18 +56,9 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location'
"creditor" : $scope.creditor
});
console.log(newTransaction);
// create copy of transaction object
var newTransactionCopy = (JSON.parse(JSON.stringify(newTransaction)));
$scope.newTransaction = newTransaction;
$scope.newTransactionCopy = newTransactionCopy;
newTransaction.$save(function(transaction, putResponseHeaders) {
newTransaction.$save(function(transaction) {
$scope.refreshList();
});
};
$scope.showTransaction = function(transaction) {