Skip to content

Commit 8aaa53a

Browse files
committed
feat($ViewDirective) add $viewContentAnimationEnded trigger
This event will trigger when the animation on the ui-view is done animating.
1 parent 5e88789 commit 8aaa53a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/viewDirective.js

+4
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,10 @@ function $ViewDirective( $state, $injector, $uiViewScroll) {
210210

211211
var clone = $transclude(newScope, function(clone) {
212212
renderer.enter(clone, $element, function onUiViewEnter() {
213+
if(currentScope) {
214+
currentScope.$emit('$viewContentAnimationEnded');
215+
}
216+
213217
if (angular.isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) {
214218
$uiViewScroll(clone);
215219
}

0 commit comments

Comments
 (0)