accountant-ui/src/operations/operation.module.ts

55 lines
1.3 KiB
TypeScript

// vim: set tw=80 ts=2 sw=2 sts=2 :
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { NgLoggerModule, Level } from '@nsalaun/ng-logger';
import { RestangularModule } from 'ngx-restangular';
import { BalanceChartComponent } from './balanceChart.component';
import { CategoryChartComponent } from './categoryChart.component';
import { CategoryService } from './category.service';
import { OperationService } from './operation.service';
export function $modalServiceFactory(i: any) {
return i.get('$modal');
}
export function accountIdServiceFactory(i: any) {
return i.get('accountIdService');
}
@NgModule({
imports: [
HttpModule,
CommonModule,
FormsModule,
NgLoggerModule,
RestangularModule,
],
providers: [
CategoryService,
OperationService,
{
provide: '$modal',
deps: ['$injector'],
useFactory: $modalServiceFactory
}, {
provide: 'accountIdService',
deps: ['$injector'],
useFactory: accountIdServiceFactory
}
],
declarations: [
BalanceChartComponent,
CategoryChartComponent,
],
entryComponents: [
BalanceChartComponent,
CategoryChartComponent,
]
})
export class OperationModule {}