Switch to uirouter.

This commit is contained in:
Alexis Lahouze
2017-07-16 13:56:49 +02:00
parent 9910c0e0d3
commit 83d7e61875
8 changed files with 49 additions and 35 deletions

View File

@ -1,7 +1,7 @@
var scheduleFormTmpl = require('./schedule.form.tmpl.html'),
scheduleDeleteTmpl = require('./schedule.delete.tmpl.html');
module.exports= function($rootScope, $routeParams, Notification, ScheduledOperation, $log, $modal) {
module.exports= function($rootScope, $stateParams, Notification, ScheduledOperation, $log, $modal) {
var vm = this;
// Operation store.
@ -13,7 +13,7 @@ module.exports= function($rootScope, $routeParams, Notification, ScheduledOperat
vm.add = function() {
var operation = new ScheduledOperation({
// eslint-disable-next-line camelcase
account_id: $routeParams.accountId
account_id: $stateParams.accountId
});
return vm.modify(operation);
@ -25,7 +25,7 @@ module.exports= function($rootScope, $routeParams, Notification, ScheduledOperat
vm.load = function() {
return ScheduledOperation.query({
// eslint-disable-next-line camelcase
account_id: $routeParams.accountId
account_id: $stateParams.accountId
});
};