Skip to content

Commit

Permalink
feat($ViewDirective) add $viewContentAnimationEnded trigger
Browse files Browse the repository at this point in the history
This event will trigger when the animation on the ui-view is done animating.
  • Loading branch information
MichielDeMey committed Aug 28, 2014
1 parent 5e88789 commit 8aaa53a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/viewDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ function $ViewDirective( $state, $injector, $uiViewScroll) {

var clone = $transclude(newScope, function(clone) {
renderer.enter(clone, $element, function onUiViewEnter() {
if(currentScope) {
currentScope.$emit('$viewContentAnimationEnded');
}

if (angular.isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) {
$uiViewScroll(clone);
}
Expand Down

0 comments on commit 8aaa53a

Please sign in to comment.