Inject $modal from router.
This commit is contained in:
parent
4f090a22df
commit
7b7f72bf1e
@ -24,6 +24,9 @@ export default function AppConfig($uiRouterProvider) {
|
|||||||
resolve: {
|
resolve: {
|
||||||
accountId: function($transition$) {
|
accountId: function($transition$) {
|
||||||
return $transition$.params().accountId;
|
return $transition$.params().accountId;
|
||||||
|
},
|
||||||
|
$modal: function($modal) {
|
||||||
|
return $modal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -49,7 +49,8 @@ export default angular.module('accountant.scheduler', [
|
|||||||
|
|
||||||
.component('scheduleComponent', {
|
.component('scheduleComponent', {
|
||||||
bindings: {
|
bindings: {
|
||||||
accountId: '<'
|
accountId: '<',
|
||||||
|
$modal: '<'
|
||||||
},
|
},
|
||||||
templateUrl: schedulerTmpl,
|
templateUrl: schedulerTmpl,
|
||||||
controller: ScheduleComponent,
|
controller: ScheduleComponent,
|
||||||
|
@ -11,6 +11,7 @@ var scheduleFormTmpl = require('./schedule.form.tmpl.html'),
|
|||||||
scheduleDeleteTmpl = require('./schedule.delete.tmpl.html');
|
scheduleDeleteTmpl = require('./schedule.delete.tmpl.html');
|
||||||
|
|
||||||
export class ScheduleComponent {
|
export class ScheduleComponent {
|
||||||
|
$modal: any;
|
||||||
accountId: number;
|
accountId: number;
|
||||||
operations = [];
|
operations = [];
|
||||||
|
|
||||||
@ -18,7 +19,6 @@ export class ScheduleComponent {
|
|||||||
private toastrService: ToastrService,
|
private toastrService: ToastrService,
|
||||||
private scheduleService: ScheduleService,
|
private scheduleService: ScheduleService,
|
||||||
private logger: Logger,
|
private logger: Logger,
|
||||||
private $modal
|
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
$onInit() {
|
$onInit() {
|
||||||
|
Loading…
Reference in New Issue
Block a user