DEV Community

Discussion on: Angular: How to easily display loading indicators

Collapse
 
johncarroll profile image
John Carroll

Oh interesting. Are you saying that you'd like to provide your own component to act as the loading spinner? Currently that's not a supported feature, but I think it would be easy to add. If you open a feature request in the repo, I might be able to do it this week. I think all that would need to happen is update ISWIsLoadingDirectiveConfig to accept a spinner component class and then have IsLoadingDirective use that instead of the default IsLoadingSpinnerComponent.

Collapse
 
stephen_haney_65559bb7cbc profile image
Stephen Haney

Initially I was thinking it'd be nice to have it inject my own component as I want contemplating some more context-specific logic to adjust spinner size and animations to use if its a button (and then some logic branching if its an icon button vs non-icon) or just some random div. Perhaps the config could have an optional IsLoadingSpinnerComponent where I could just reference my own component.

I ended up getting 99% of the way there using CSS and just having very specific selector patterns to branch logic so its not a huge deal but I can enter a feature request in the repo. Thanks!

Thread Thread
 
johncarroll profile image
John Carroll

FYI in case you missed it, I replied to the feature request you opened with a followup question.