From 7281d1f11d061b306f39340b1c659313ec8f83c9 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Thu, 27 Jul 2017 14:31:15 +0200 Subject: [PATCH] Use accountIdService to retrieve current Account Id. --- src/operations/category-chart.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/operations/category-chart.component.ts b/src/operations/category-chart.component.ts index c9f5fcd..f07bec8 100644 --- a/src/operations/category-chart.component.ts +++ b/src/operations/category-chart.component.ts @@ -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) {