urish/angular-spinner

Noob Question : How Can I change the spinner itself.

Closed this issue · 3 comments

Hello,

I'm using angular-spinner and I would like to change the view of spinner. How can I change it. Is there a way that change it or I have to use it as it is.

Hi @tucibeyin ,
The angular-spinner thing is just a wrapper for the original spin.js, so you can look at the spin.js view configuration.

image

I hope that helped 😉

Sorry if I disturb you again for second noob question.

I'm showing us spinner in a span and inorder to customize it I used usSpinnerConfigProvider like :

image

What I wonder is how can I set my gif file ( like background or content I don not know. ) in order to change the appearance of it.

(Maybe the root question is that is there any documentation that I can read about what does usSpinnerConfigProvider do for me and usage of setTheme ? Maybe ı can find the answer in it. )

Thank you @Attrash-Islam !

The usage is found in the main page here on Github.

Themes provide named default options for spinners. Any options passed from a directive still override these.

myapp.config(['usSpinnerConfigProvider', function (usSpinnerConfigProvider) {
    usSpinnerConfigProvider.setTheme('bigBlue', {color: 'blue', radius: 20});
    usSpinnerConfigProvider.setTheme('smallRed', {color: 'red', radius: 6});
}]);
<span us-spinner spinner-theme="smallRed"></span>

The important thing to note here that the theme configuration must be injected into the config phase
myapp.config as shown above in the example.

If you have any problems try to produce a jsbin example and I'll be glad to help