Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does loading-bar need ng-animate? #33

Open
bbottema opened this issue Jan 1, 2014 · 8 comments
Open

Why does loading-bar need ng-animate? #33

bbottema opened this issue Jan 1, 2014 · 8 comments

Comments

@bbottema
Copy link
Contributor

bbottema commented Jan 1, 2014

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
Copy link
Contributor Author

bbottema commented Jan 6, 2014

It seems Angular will have a fix ready next release.

@chieffancypants
Copy link
Owner

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.

@bbottema
Copy link
Contributor Author

bbottema commented Jan 6, 2014

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.

@chieffancypants
Copy link
Owner

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

@fedotxxl
Copy link

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?

@chieffancypants
Copy link
Owner

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.

@danie11am
Copy link

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

@efolio
Copy link

efolio commented Aug 30, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants