Inject $modal from router.
This commit is contained in:
parent
4f090a22df
commit
7b7f72bf1e
@ -24,6 +24,9 @@ export default function AppConfig($uiRouterProvider) {
|
||||
resolve: {
|
||||
accountId: function($transition$) {
|
||||
return $transition$.params().accountId;
|
||||
},
|
||||
$modal: function($modal) {
|
||||
return $modal;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -49,7 +49,8 @@ export default angular.module('accountant.scheduler', [
|
||||
|
||||
.component('scheduleComponent', {
|
||||
bindings: {
|
||||
accountId: '<'
|
||||
accountId: '<',
|
||||
$modal: '<'
|
||||
},
|
||||
templateUrl: schedulerTmpl,
|
||||
controller: ScheduleComponent,
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user