Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Previous html appended by ng-view wasn't removed if animation last for a while #5162

Closed
leftstick opened this issue Nov 27, 2013 · 4 comments

Comments

@leftstick
Copy link

I have several partials in my project, and i used ng-view to switch between those views.

The previous partial html should be removed after a new partial is added, right?

A weird thing i found during development, once i have animation like ng-enter, ng-leave..., they cannot last like 410ms or 510ms(for example: transition-duration cannot be a number like 410ms/510ms). Otherwise, the previous html wouldn't be removed.

I am using the latest stable version: 1.2.2, and only used CSS-defined Animations.

This was not only happened with ng-view, but also other features. Like i have a service which set a $timeout for removing data when it's timeout. The DOM should do the corresponding change as the data. It worked perfectly without animation or animation last not 410ms/510ms. But if i have animation, and it last up to 410ms/510ms, the DOM would never modified.

I haven't do too much test for other values, but pretty sure 410 and 510 doesn't work. It is very very strange.

Am i missed some parts? Or broke something that i don't know?

Thanks!

@matsko
Copy link
Contributor

matsko commented Nov 27, 2013

@leftstick can you please provide a plunkr example?

@leftstick
Copy link
Author

Hi @matsko, see my plunker, If you run it with Firefox(My version is 25.0.1), you would see the <div ng-view></div> inserted without removing the previous one. But it works just perfect with chrome.
Thanks

@matsko
Copy link
Contributor

matsko commented Nov 28, 2013

Alright fixed. The commit is ready. This was a strange bug that firefox was producing which resulted in the duration being a long decimal point value.

So 5.1 ended up being 5.091293719273123.

Thanks for finding the bug! This fix will show up next week in 1.2.4.

@leftstick
Copy link
Author

Good to know, thanks

matsko added a commit to matsko/angular.js that referenced this issue Dec 4, 2013
matsko added a commit that referenced this issue Dec 5, 2013
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this issue Jan 27, 2014
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this issue Jan 27, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants