Use accountIdService to retrieve current Account Id.

This commit is contained in:
Alexis Lahouze 2017-07-27 14:31:15 +02:00
parent eb0d898c19
commit 7281d1f11d

View File

@ -35,12 +35,12 @@ module.exports = angular.module('categoryChartModule', [
minDate: '<',
maxDate: '<'
},
controller: function($stateParams, $element, Categories, Incomes) {
controller: function(accountIdService, $element, Categories, Incomes) {
var vm = this;
vm.loadData = function() {
Categories.query({
id: $stateParams.accountId,
id: accountIdService.get(),
begin: vm.minDate ? moment(vm.minDate).format('YYYY-MM-DD') : null,
end: vm.maxDate ? moment(vm.maxDate).format('YYYY-MM-DD') : null
}, function(results) {