You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 23, 2025. It is now read-only.
I recently had an issue with the loading bar flashing before it faded in, so I updated the bar to use css3 transitions instead of $animate for fade in/out. This seems to work just like it did before, and it simplified the css a little.
The bar and spinner are now only inserted the first time _start is called, and shown/hidden by adding/removing the active class. Unfortunately, ngAnimate can't quite be removed as a dependency since we still need a cleanup promise from $animate.removeClass, but at least it's used minimally.
I couldn't get the tests to run, however... npm install && grunt build resulted in the following error:
Everything seems ok in the example project, though, so I'm going to start using this fork in the hopes that this will get merged eventually.
I forgot to bower install, checking the tests now.
I ended up removing $animate altogether - at the cost of using a $timeout to remove the DOM elements after the css animation finishes. $animate.removeClass would have been ideal, but it was not returning a promise under test, and it resolves immediately if you don't have ngAnimate in your app. To make $timeout less painful, I added a configuration option to set the fade duration.
I encapsulated the parts of the service that are transient - now it's easier to understand what gets thrown out when the timeout in .complete() is called. This means the elements are created every time .start() is called and there isn't an active bar, which means there's no confusion when one bar is fading and another is started - the new one has new DOM elements and fades in right on top.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I recently had an issue with the loading bar flashing before it faded in, so I updated the bar to use css3 transitions instead of $animate for fade in/out. This seems to work just like it did before, and it simplified the css a little.
The bar and spinner are now only inserted the first time _start is called, and shown/hidden by adding/removing the
activeclass. Unfortunately,ngAnimatecan't quite be removed as a dependency since we still need a cleanup promise from$animate.removeClass, but at least it's used minimally.I couldn't get the tests to run, however...npm install && grunt buildresulted in the following error:Everything seems ok in the example project, though, so I'm going to start using this fork in the hopes that this will get merged eventually.I forgot to bower install, checking the tests now.