ng-switch / ng-if flickering

2,394 views
Skip to first unread message

Matthieu Scholler

unread,
Aug 20, 2013, 10:42:39 AM8/20/13
to ang...@googlegroups.com
Hi all,

I recently migrated to 1.2.0-rc1 and I'm really happy with it. Especially for the ng-if which can be a big performance improvement for rendering, compared to ng-show.
Except there is some flickering when the boolean changes. See the plunkr below for an example:

On Chrome, you'll see that the first 2 implementations will flicker whereas the 2 others won't. 
On Firefox, the flicker happens only rarely.

Is that normal? Is there a way to avoid that? Should I go back to using ng-show?

Matthew Windwer

unread,
Aug 20, 2013, 1:16:11 PM8/20/13
to ang...@googlegroups.com
This is a bug with ngAnimate in 1.2 rc1.  You will notice how if you remove 'ngAnimate' as a dependency it works fine (see this plunkr: http://plnkr.co/edit/BNKc9CfjiEBuYWCNdRWV?p=preview)

Please see:


and

Matthieu Scholler

unread,
Aug 20, 2013, 2:12:23 PM8/20/13
to ang...@googlegroups.com
The answer I was expecting, thanks a lot!
Reply all
Reply to author
Forward
0 new messages