1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 15:29:42 +02:00

refactor(app): upgrade to the latest version of ui-router (#1219)

* refactor(app): upgrade to the latest version of ui-router

* fix(app): define optional from parameter in action.create.container state

* refactor(app): replace $uiRouterGlobals with $transition$
This commit is contained in:
Anthony Lapenna 2017-09-21 16:00:53 +02:00 committed by GitHub
parent 819d0f6a16
commit ff628bb438
25 changed files with 118 additions and 115 deletions

View file

@ -1,12 +1,12 @@
angular.module('volume', [])
.controller('VolumeController', ['$scope', '$state', '$stateParams', 'VolumeService', 'Notifications',
function ($scope, $state, $stateParams, VolumeService, Notifications) {
.controller('VolumeController', ['$scope', '$state', '$transition$', 'VolumeService', 'Notifications',
function ($scope, $state, $transition$, VolumeService, Notifications) {
$scope.removeVolume = function removeVolume() {
$('#loadingViewSpinner').show();
VolumeService.remove($scope.volume)
.then(function success(data) {
Notifications.success('Volume successfully removed', $stateParams.id);
Notifications.success('Volume successfully removed', $transition$.params().id);
$state.go('volumes', {});
})
.catch(function error(err) {
@ -19,7 +19,7 @@ function ($scope, $state, $stateParams, VolumeService, Notifications) {
function initView() {
$('#loadingViewSpinner').show();
VolumeService.volume($stateParams.id)
VolumeService.volume($transition$.params().id)
.then(function success(data) {
var volume = data;
$scope.volume = volume;