Prepare needed injection to upgrade Operation Component to Angular2.
This commit is contained in:
parent
45af7791ff
commit
f7ea8a4621
@ -13,6 +13,14 @@ 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,
|
||||
@ -24,6 +32,15 @@ import { OperationService } from './operation.service';
|
||||
providers: [
|
||||
CategoryService,
|
||||
OperationService,
|
||||
{
|
||||
provide: '$modal',
|
||||
deps: ['$injector'],
|
||||
useFactory: $modalServiceFactory
|
||||
}, {
|
||||
provide: 'accountIdService',
|
||||
deps: ['$injector'],
|
||||
useFactory: accountIdServiceFactory
|
||||
}
|
||||
],
|
||||
declarations: [
|
||||
BalanceChartComponent,
|
||||
|
Loading…
Reference in New Issue
Block a user