Prepare scheduler module for angular2 upgrade.

This commit is contained in:
Alexis Lahouze 2017-07-22 09:16:16 +02:00
parent aa07ffb125
commit 68df4e5ce2

View File

@ -20,6 +20,15 @@
var angular = require('angular'); var angular = require('angular');
import {
downgradeInjectable,
downgradeComponent
} from '@angular/upgrade/static';
import { Logger } from '@nsalaun/ng-logger';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { ToastrService } from 'ngx-toastr';
var ngMessages = require('angular-messages'), var ngMessages = require('angular-messages'),
ngUiNotification = require('angular-ui-notification'), ngUiNotification = require('angular-ui-notification'),
ngStrap = require('angular-strap'); ngStrap = require('angular-strap');
@ -32,6 +41,11 @@ export default angular.module('accountant.scheduler', [
ngUiNotification, ngUiNotification,
ngStrap ngStrap
]) ])
.factory('toastrService', downgradeInjectable(ToastrService))
.factory('ngbModal', downgradeInjectable(NgbModal))
.factory('logger', downgradeInjectable(Logger))
.factory('ScheduledOperation', ScheduleFactory) .factory('ScheduledOperation', ScheduleFactory)