refactor(stack): replace $stateParams usage with $transition$.params()

pull/1551/head
Anthony Lapenna 2018-01-04 21:53:10 +01:00
parent 52ac9504c1
commit 5787df5599
1 changed files with 3 additions and 3 deletions

View File

@ -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) {