How to add a loading spinner to an Angular Material button
…wouldn’t it be nice if Angular Material had a button with a loading spinner? Like the loading buttons that Semantic UI has.
Instead of ranting I decided to try to code this — and succeeded!
With no further ado, I’ve included the code below.
Our spinner (CSS).
Our button (HTML).
Our .ts file (the logic)
I told you this was simple. You’re welcome. Hope you enjoyed it!
Please pound that 👏 button. Thank-you!
And follow me on Medium for more articles like this one.
Feel free to check out some other short, helpful Angular posts…
AngularJS is dying… here are 5 reasons why you should upgrade to Angular
There has been no active development on AngularJS since 2018. Yet I’m amazed at how many big-name websites I find that…