diff --git a/src/scheduler/schedule.component.ts b/src/scheduler/schedule.component.ts index 3c427a2..a117e8f 100644 --- a/src/scheduler/schedule.component.ts +++ b/src/scheduler/schedule.component.ts @@ -11,7 +11,6 @@ var scheduleFormTmpl = require('./schedule.form.tmpl.html'), scheduleDeleteTmpl = require('./schedule.delete.tmpl.html'); export class ScheduleComponent { - $modal: any; accountId: number; operations = []; diff --git a/src/scheduler/schedule.module.ts b/src/scheduler/schedule.module.ts index 27fee9e..505d983 100644 --- a/src/scheduler/schedule.module.ts +++ b/src/scheduler/schedule.module.ts @@ -14,6 +14,14 @@ import { ScheduleService } from './schedule.service'; import { ScheduleDeleteModalComponent } from './scheduleDeleteModal.component'; import { ScheduleRowComponent } from './scheduleRow.component'; +export function $modalServiceFactory(i: any) { + return i.get('$modal'); +} + +export function accountIdServiceFactory(i: any) { + return i.get('accountIdService'); +} + @NgModule({ imports: [ HttpModule, @@ -25,7 +33,16 @@ import { ScheduleRowComponent } from './scheduleRow.component'; NgbModule ], providers: [ - ScheduleService + ScheduleService, + { + provide: '$modal', + deps: ['$injector'], + useFactory: $modalServiceFactory + }, { + provide: 'accountIdService', + deps: ['$injector'], + useFactory: accountIdServiceFactory + } ], declarations: [ ScheduleDeleteModalComponent,