radio buttons

This commit is contained in:
2016-04-15 16:09:27 +02:00
parent f628531c09
commit 0c1ecc6670
2 changed files with 22 additions and 1 deletions
@@ -33,6 +33,16 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location'
}
});
// HIER GEHT'S WEITER
// URL des aktuell selektierten Account ermitteln, dann /accounts/id/users abrufen, Liste für Rediobuttons bereitstellen
// var users = $resource('/categories/search/listForAccount', { accountId: $scope.accounts[0].id }).get();
// categories.$promise.then(function(data) {
// $scope.categories = categories._embedded.categories;
//
// $scope.refreshList();
// });
}
$scope.initList = function() {
@@ -49,6 +59,10 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location'
var categories = $resource('/categories/search/listForAccount', { accountId: $scope.accounts[0].id }).get();
categories.$promise.then(function(data) {
$scope.categories = categories._embedded.categories;
//$scope.categories.push({id: -1, name: '────────────────', position: 9999, disabled: true});
$scope.categories.push({id: -1, name: 'private Entnahme', position: 10000, _links: { self: {href: 'withdrawal'}}});
$scope.refreshList();
});
});