angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

ngClass on ngView is not in sync since 1.4.0-rc.0

Open m4r71n opened this issue 10 years ago • 9 comments

Working example with 1.4.0-beta.6: http://plnkr.co/edit/aBcSTUO8Et17Y8MSWNJL?p=preview 2015-06-10_221405 Also working with 1.3.16: http://plnkr.co/edit/ntFbY3UAloinduesYArq?p=preview

Broken example with 1.4.0-rc.0: http://plnkr.co/edit/22mLv7fXesMVXfEwX6Yt?p=preview 2015-06-10_221455 Also broken with 1.4.1: http://plnkr.co/edit/HBKVKqSLamxCR654QKrs?p=preview

I'm not sure if this is a bug or if I need to change something because of c8700f04fb6fb5dc21ac24de8665c0476d6db5ef?

m4r71n avatar Jun 10 '15 20:06 m4r71n

What exactly is the problem? Do your animations not work anymore? I cannot say with 100% certainty that the first example is correct, because I am not sure if the view animations are supposed to happen exactly at the same time.

Narretz avatar Jun 16 '15 21:06 Narretz

Have you tried with 1.4.1?

Narretz avatar Jun 16 '15 21:06 Narretz

I've updated the examples. With 1.3.16 and 1.4.0-beta.6 both ngViews slide at the same time in the same direction. With 1.4.0-rc.0 and 1.4.1 they sometimes crossover or slide away from each other. By clicking the buttons in this order you can see the difference: 2,3,2,1,2

m4r71n avatar Jun 17 '15 07:06 m4r71n

There are two bugs that exist here:

  1. There is an issue with ngClass in 1.4.x
  2. With the way that ngView works it destroys the scope first and then animates so the classes on the element don't get picked up in time.

I will aim to have both issues fixed in 1.4.2.

matsko avatar Jun 29 '15 13:06 matsko

Alright so this isn't an issue with ngClass (I tested this against #12248 and it didn't fix it). So it looks like it is number 2 on the list.

matsko avatar Jul 17 '15 02:07 matsko

@matsko The problem still repdroduces in the current snapshot.

Narretz avatar Aug 03 '15 22:08 Narretz

Still broken in 1.4.6 :(

Narretz avatar Sep 23 '15 15:09 Narretz

Applying a quick hack around $animate.{add,remove}Class() which performs the class manipulation before the proper queuing seems to solve the issue visually:

http://plnkr.co/edit/f7rjvA2waeVGPSWyAoor?p=preview

alexlamsl avatar Sep 23 '15 21:09 alexlamsl

I am aware of this issue and I will have a look at it tomorrow. Sorry for the delays and thank you for keeping this issue going.

matsko avatar Sep 24 '15 02:09 matsko