diff --git a/src/app.config.ts b/src/app.config.ts index d9d521e..035c0d7 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -24,6 +24,9 @@ export default function AppConfig($uiRouterProvider) { resolve: { accountId: function($transition$) { return $transition$.params().accountId; + }, + $modal: function($modal) { + return $modal; } } }); diff --git a/src/scheduler/index.ts b/src/scheduler/index.ts index fb0a8cb..e1b6835 100644 --- a/src/scheduler/index.ts +++ b/src/scheduler/index.ts @@ -49,7 +49,8 @@ export default angular.module('accountant.scheduler', [ .component('scheduleComponent', { bindings: { - accountId: '<' + accountId: '<', + $modal: '<' }, templateUrl: schedulerTmpl, controller: ScheduleComponent, diff --git a/src/scheduler/schedule.component.ts b/src/scheduler/schedule.component.ts index f2fc90c..1b467f3 100644 --- a/src/scheduler/schedule.component.ts +++ b/src/scheduler/schedule.component.ts @@ -11,6 +11,7 @@ var scheduleFormTmpl = require('./schedule.form.tmpl.html'), scheduleDeleteTmpl = require('./schedule.delete.tmpl.html'); export class ScheduleComponent { + $modal: any; accountId: number; operations = []; @@ -18,7 +19,6 @@ export class ScheduleComponent { private toastrService: ToastrService, private scheduleService: ScheduleService, private logger: Logger, - private $modal ) {} $onInit() {