catdadcode / angular-spinners

A library for easily managing loading spinners in complex Angular2+ applications.
MIT License
140 stars 49 forks source link

Spinner showing for a brief moment without calling show #5

Closed parky128 closed 8 years ago

parky128 commented 8 years ago

Hi, I have recently started using this directive with a bootstrap modal component, to show a spinner when a user clicks a button for performing an action.

Everything on that front is working just fine, but there is one odd issue whereby the spinner will show as soon as the modal is displayed. I see from the docs the spinners should be hidden by default when first registered, I tried using the show=false option but this make no different for me:

<spinner class="loading-spinner--table" name="product-copy-spinner" group="modal-spinners" show="false"></spinner>

I'll try and get a quick code sample going to show you what I mean, in the mean time if you know why this could be happening then please advise. Thanks

catdadcode commented 8 years ago

When I read your issue I immediately assumed I accidentally used a plain src attribute on the spinner image tag, but after checking it appears I did use ng-src, which is supposed avoid the image showing briefly while Angular does its stuff. I have one thing I can try by adding an ng-cloak directive to the image tag, but without any more information to duplicate this issue there's no way for me to test it. If you could provide a demo that would be great!

PS - Sorry for the late reply. I somehow missed all notifications about this issue being created :/