replacing all stateChangeSuccess for $transition.onSuccess

This commit is contained in:
Jared Tabor
2017-10-09 16:38:11 -07:00
parent 6e3f4a7a6e
commit f9c991e660
16 changed files with 91 additions and 83 deletions

View File

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