urish/angular-spinner

How can I specify the target of the spinner?

Closed this issue · 3 comments

"The spin() method creates the necessary HTML elements and starts the animation. If a target element is passed as argument, the spinner is added as first child and horizontally and vertically centered."

I don't really see how I can do this with the angular-spinner. If it's possible, can you show me how?

Here is an example using the raw javascript version: http://jsfiddle.net/fgnass/q6ou3dt7/

Thanks

urish commented

You just attach the "us-spinner" attribute to the element, like the example in the readable:

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

regardless of which element you attach the "us-spinner" attribute to, the spinner never renders next to the element.
sshot-1

urish commented

Please try applying the following styles to the target element:

display:inline-block; position: relative;