ui-router: event $viewContentLoading doesn't seem to work

It seems I’m unable to get the $viewContentLoading fired.

The doc says it’s fired by the $rootScope, while in the example listen to the $scope

$scope.$on('$viewContentLoading', 
function(event, viewConfig){ 
    // Access to all the view config properties.
    // and one special property 'targetView'
    // viewConfig.targetView 
});

I’ve tried both, but I couldn’t catch any event

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 30 (8 by maintainers)

Commits related to this issue

Most upvoted comments

I can surely tell that the controller gets istantiated because in this code

        $scope.$on('$viewContentLoading',
            function(event, viewConfig){
                console.log('content loading: ', event, viewConfig)
            });

        $scope.$on('$viewContentLoaded',
            function(event){
                console.log('content loaded: ',event)
            });

The event $viewContentLoaded gets fired, while the $viewContentLoading gets not

I’m experiencing this problem with Angular 1.2.2 as well as 1.2.5