angular-loading-bar icon indicating copy to clipboard operation
angular-loading-bar copied to clipboard

Why does loading-bar need ng-animate?

Open bbottema opened this issue 11 years ago • 8 comments

With angularjs 1.2.x ng-animate became redundant in the face of CSS3 transitions.

For example with bootstrap's .fade and .in style classes, the now preferable approach is to simply use ng-class:

<div class="fade" ng-class="{in: someScopeValue}"></div>

CSS3 will take care of the rest.

The real reason I'm asking is because right now ng-animate is breaking my transitions and if I remove it, loading-bar doesn't seem any different to me.

bbottema avatar Jan 01 '14 02:01 bbottema

It seems Angular will have a fix ready next release.

bbottema avatar Jan 06 '14 10:01 bbottema

Good to see you helped with the bug! I don't have any strong preferences here, but your suggestion requires the use of bootstrap, correct? I'd like for this to remain as neutral as possible to CSS frameworks which is why I went with ng-animate.

To answer your other question, the only thing I'm using ng-animate for is to provide a nicer fade in and out when inserting the loading bar and spinner into the dom. If you don't care for this, you can simply remove the ng-animate dependency.

chieffancypants avatar Jan 06 '14 19:01 chieffancypants

Good call, I didn't realize loading-bar doesn't use Bootstrap (as it feels so natural to me nowadays). But it makes sense.

Actually, .fade and .in classes are very simpel and you can include them in your own style sheet of course. All they do is provide simpel CSS3 transition for fading. I would vote for less dependencies on Angular add-ons as well if possible.

Your call.

bbottema avatar Jan 06 '14 19:01 bbottema

Ok, lately I've been having so many issues related to angular-animate that I'll try and replace with a simple CSS3 transition in a new branch and remove that dependency

chieffancypants avatar Feb 14 '14 20:02 chieffancypants

Hi. What's the status of this issue? I don't use angular-animate but I still want loading-bar animations. Can you provide animations support without angular-animate module?

fedotxxl avatar Mar 10 '14 12:03 fedotxxl

I did it recently in another project, and the change is trivial, but I'll need to ensure this is done in a way that doesn't break compatibility. Shouldn't be a tough change, but I haven't had a ton of time to work on it lately. Definitely in the next few weeks though.

chieffancypants avatar Mar 11 '14 14:03 chieffancypants

I have the same issue. Look forward to this fix. Good work by the way!

danie11am avatar May 16 '14 06:05 danie11am

:+1:

efolio avatar Aug 30 '14 14:08 efolio