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 { CategoryService } from './category.service';
|
||||||
import { OperationService } from './operation.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({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
HttpModule,
|
HttpModule,
|
||||||
@ -24,6 +32,15 @@ import { OperationService } from './operation.service';
|
|||||||
providers: [
|
providers: [
|
||||||
CategoryService,
|
CategoryService,
|
||||||
OperationService,
|
OperationService,
|
||||||
|
{
|
||||||
|
provide: '$modal',
|
||||||
|
deps: ['$injector'],
|
||||||
|
useFactory: $modalServiceFactory
|
||||||
|
}, {
|
||||||
|
provide: 'accountIdService',
|
||||||
|
deps: ['$injector'],
|
||||||
|
useFactory: accountIdServiceFactory
|
||||||
|
}
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
BalanceChartComponent,
|
BalanceChartComponent,
|
||||||
|
Loading…
Reference in New Issue
Block a user