From 5787df5599ee945a0593bbf0672d8db0f42d5149 Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Thu, 4 Jan 2018 21:53:10 +0100 Subject: [PATCH] refactor(stack): replace $stateParams usage with $transition$.params() --- app/components/stack/stackController.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/components/stack/stackController.js b/app/components/stack/stackController.js index 5484ba82d..976b473b2 100644 --- a/app/components/stack/stackController.js +++ b/app/components/stack/stackController.js @@ -1,6 +1,6 @@ angular.module('stack', []) -.controller('StackController', ['$q', '$scope', '$state', '$stateParams', '$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) { +.controller('StackController', ['$q', '$scope', '$state', '$transition$', '$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 = { actionInProgress: false, @@ -36,7 +36,7 @@ function ($q, $scope, $state, $stateParams, $document, StackService, NodeService }; function initView() { - var stackId = $stateParams.id; + var stackId = $transition$.params().id; StackService.stack(stackId) .then(function success(data) {