Ng-leave animation not working, ng-enter does?

As the topic says, my ng-enter animation works, but no animation is done on ng-leave.

css:

.ng-enter{
	transition: .75s;
	opacity: 0;
}
.ng-enter-active{
	opacity: 1;
}

.ng-leave{
	transtion: .75s;
	opacity: 1;
}
.ng-leave-active{
	opacity: 0;
}

I have no idea why it’s like this, just started experimenting with angular.

Still can’t figure out why ng-leave won’t work, the page only fades in out but no fading out.

Could it be that you spelled transition incorrectly.

.ng-leave{
	transtion: .75s;
	opacity: 1;
}

Or was that just a typo in the code window?

That was just a code window typo. But I seem to have figured out the issue. Enter and leave animations seem to trigger at the same time, and when adding a z-index and positioning them absolutely i can see that both animations are triggered.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.