Skip to content Skip to sidebar Skip to footer

How Can I Trigger An Event When An Angular Js Route Template Has Been Loaded

Does anyone know how to trigger an event when an angular route has rendered its view? I'd like to route the application and at the end of the template being rendered I would like i

Solution 1:

Does this do what you're after?

$scope.$on('$routeChangeSuccess', function () {
  // run some code to do your animations
});

Go to http://docs.angularjs.org/api/ and take a look at $route (LHS menu under ngRoute module)

Or take a look at this question I asked....AngularJS - Animate ng-view transitions

Post a Comment for "How Can I Trigger An Event When An Angular Js Route Template Has Been Loaded"