question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature: Stop all/Start all spinners

See original GitHub issue

Hi,

I need to stop all spinners if server responds with error. Currently it is not possible.

I would implement it with oneliner: angular-spinner.js:

scope.$on('us-spinner:stop', function (event, key) {
    if (key === scope.key || key === undefined) {
        scope.stop();
    }
});

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
marknadigcommented, Oct 12, 2015

@urish I was just needing this as well. I want our “global” $http response error handler to turn off all spinners. My first thought was something similar to @tonila 's approach, but rather than an empty string, perhaps a “*” would be more clear on the intent. Then I thought a more generic approach my just be to support regex.

scope.$on('us-spinner:stop', function (event, key) {
    if (scope.key.match(key) {
        scope.stop();
    }
});

This leads to a lot of flexibility, provides backward compatibility and no special case characters. I appreciate any feedback. Would love to send a PR in for this if you agree.

0reactions
Attrash-Islamcommented, Jan 16, 2017

I’ll add the simplest approach suggested by this issue reporter, and I’ll give the credits in the commit message to @tonila .

I’ll add more unit tests to cover this case, and I’ll add this feature to the README file

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allstar Innovations Spice Spinner Three-Tiered ...
Spice Spinner is the adjustable three-tiered spice organizer/rack that stores and stacks all your spices, so you can save space and keep everything...
Read more >
Spice Spinner - Allstar Innovations Store
Spice Spinner is the adjustable two-tiered spice organizer/rack that stores and stacks all your spices, so you can save space and keep ...
Read more >
Angular directive to show an animated spinner (using spin.js)
The usSpinnerService service let you control spin start and stop by key. Whenever the key is not specified all the spinner will be...
Read more >
Solved so that it simulates a slot machine. There are - Chegg
Question: so that it simulates a slot machine. There are three spinners that display digits. When the button is clicked, the spinners should...
Read more >
song and lyrics by Stardust All Stars | Spotify
Listen to The Spinners (Originally Performed by One of a Kind (Love Affair) ) ... Red Hot Chili Peppers (Originally Performed by Can't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found