From 146bfaa9debbe0f291bdcbaf126fc7e24f730eac Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Fri, 3 Jan 2020 11:46:55 +0100 Subject: [PATCH] Remove unused StateController.previousName Change-type: patch --- lib/gui/app/app.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/gui/app/app.js b/lib/gui/app/app.js index 5308dbe5..c5e710dd 100644 --- a/lib/gui/app/app.js +++ b/lib/gui/app/app.js @@ -409,26 +409,11 @@ app.config(($locationProvider) => { app.controller('StateController', function ($rootScope, $scope) { const unregisterStateChange = $rootScope.$on('$stateChangeSuccess', (event, toState, toParams, fromState) => { - this.previousName = fromState.name this.currentName = toState.name }) $scope.$on('$destroy', unregisterStateChange) - /** - * @summary Get the previous state name - * @function - * @public - * - * @returns {String} previous state name - * - * @example - * if (StateController.previousName === 'main') { - * console.log('We left the main screen!'); - * } - */ - this.previousName = null - /** * @summary Get the current state name * @function