mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 23:37:39 -02:30
replacing all stateChangeSuccess for $transition.onSuccess
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
const templateUrl = require('~components/layout/layout.partial.html');
|
||||
|
||||
function AtLayoutController ($scope, strings) {
|
||||
function AtLayoutController ($scope, strings, $transitions) {
|
||||
const vm = this || {};
|
||||
|
||||
$scope.$on('$stateChangeSuccess', (event, next) => {
|
||||
vm.currentState = next.name;
|
||||
$transitions.onSuccess({}, (transition) => {
|
||||
vm.currentState = transition.to().name;
|
||||
});
|
||||
|
||||
$scope.$watch('$root.current_user', (val) => {
|
||||
@@ -34,7 +34,7 @@ function AtLayoutController ($scope, strings) {
|
||||
};
|
||||
}
|
||||
|
||||
AtLayoutController.$inject = ['$scope', 'ComponentsStrings'];
|
||||
AtLayoutController.$inject = ['$scope', 'ComponentsStrings', '$transitions'];
|
||||
|
||||
function atLayout () {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user