Closed
Description
I searched a way to get the scope associated to the current state. I used the $stateChangeSuccess event who expose the event.currentScope... but I found a strange behavior when logging the event.currentScope :
$scope.$on('$stateChangeSuccess', function(event) {
console.log('event ', event);
console.log('event.currentScope', event.currentScope);
});
The first console.log displays the whole event object, and I can see what I need under the property currentScope.
But if I try to log specifically event.currentScope
, I get an another scope (the $rootScope, I think).
With console.log or anything else, I can't get the currentScope.
See it in action here : http://jsfiddle.net/Cuicui74/HxrSd/11/ (open console).
Metadata
Metadata
Assignees
Labels
No labels