mirror of https://github.com/portainer/portainer
refactor(stack): replace $stateParams usage with $transition$.params()
parent
52ac9504c1
commit
5787df5599
|
@ -1,6 +1,6 @@
|
||||||
angular.module('stack', [])
|
angular.module('stack', [])
|
||||||
.controller('StackController', ['$q', '$scope', '$state', '$stateParams', '$document', 'StackService', 'NodeService', 'ServiceService', 'TaskService', 'ServiceHelper', 'CodeMirrorService', 'Notifications', 'FormHelper', 'EndpointProvider',
|
.controller('StackController', ['$q', '$scope', '$state', '$transition$', '$document', 'StackService', 'NodeService', 'ServiceService', 'TaskService', 'ServiceHelper', 'CodeMirrorService', 'Notifications', 'FormHelper', 'EndpointProvider',
|
||||||
function ($q, $scope, $state, $stateParams, $document, StackService, NodeService, ServiceService, TaskService, ServiceHelper, CodeMirrorService, Notifications, FormHelper, EndpointProvider) {
|
function ($q, $scope, $state, $transition$, $document, StackService, NodeService, ServiceService, TaskService, ServiceHelper, CodeMirrorService, Notifications, FormHelper, EndpointProvider) {
|
||||||
|
|
||||||
$scope.state = {
|
$scope.state = {
|
||||||
actionInProgress: false,
|
actionInProgress: false,
|
||||||
|
@ -36,7 +36,7 @@ function ($q, $scope, $state, $stateParams, $document, StackService, NodeService
|
||||||
};
|
};
|
||||||
|
|
||||||
function initView() {
|
function initView() {
|
||||||
var stackId = $stateParams.id;
|
var stackId = $transition$.params().id;
|
||||||
|
|
||||||
StackService.stack(stackId)
|
StackService.stack(stackId)
|
||||||
.then(function success(data) {
|
.then(function success(data) {
|
||||||
|
|
Loading…
Reference in New Issue