diff --git a/src/operations/category-chart.component.ts b/src/operations/category-chart.component.ts index a90c637..2a76403 100644 --- a/src/operations/category-chart.component.ts +++ b/src/operations/category-chart.component.ts @@ -36,12 +36,12 @@ module.exports = angular.module('categoryChartModule', [ maxDate: '<', account: '<' }, - controller: function($element, Categories, Incomes) { + controller: function($element, categoryService) { var vm = this; vm.loadData = function(account: Account) { categoryService.query( - accountIdService.get(), + account.id, vm.minDate ? moment(vm.minDate).format('YYYY-MM-DD') : null, vm.maxDate ? moment(vm.maxDate).format('YYYY-MM-DD') : null ).subscribe((results) => { @@ -118,20 +118,4 @@ module.exports = angular.module('categoryChartModule', [ } }) - .factory('Categories', function($resource) { - return $resource( - '/api/account/:id/category', { - id: '@id' - } - ); - }) - - .factory('Incomes', function($resource) { - return $resource( - '/api/account/:id/income', { - id: '@id' - } - ); - }) - .name;