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

Ability to control spinner

Open janicklas-ralph opened this issue 9 years ago • 0 comments

Granted the main intent of this directive is to automatically call the angular-spinner directive on Ajax requests, but an even interesting use could be that -

The angular-spinner directive gives us a way to control the display (show/hide) of the spinner through a scope variable, which is available through the spinner-on attribute.

You can direct the spinner to start and stop based on a scope expression, for example:

<span us-spinner="{radius:30, width:8, length: 16}" spinner-on="showSpinner"></span>

It would be nice if I could still control the spinner explicitly, whilst the directive works as it is when showing the loader during an Ajax request. I want to be able to control the spinner on some of my directives that just take time to render their data (No Ajax call involved while rendering :))

Thanks!

janicklas-ralph avatar Mar 17 '16 23:03 janicklas-ralph