Use cases for the Aurelia HttpClient

It’s actually in contact manager tutorial.

https://aurelia.io/docs/tutorials/creating-a-contact-manager#adding-a-loading-indicator

Using binding is easier than your manual approach.

<loading-indicator loading.bind="router.isNavigating || api.isRequesting"></loading-indicator>

Furthermore, using binding you can do trick like this Tip: show spinner only when something is slow

<loading-indicator loading.bind="router.isNavigating || api.isRequesting & debounce"></loading-indicator>
3 Likes