Reader small image

You're reading from  Angular for Enterprise Applications - Third Edition

Product typeBook
Published inJan 2024
Reading LevelExpert
PublisherPackt
ISBN-139781805127123
Edition3rd Edition
Languages
Right arrow
Author (1)
Doguhan Uluca
Doguhan Uluca
author image
Doguhan Uluca

Doguhan Uluca is a Principal Fellow at Excella in Washington, D.C., where he leads strategic initiatives and delivers critical systems. He has technical expertise in usability, mobility, performance, scalability, cybersecurity, and architecture. He is the author of the Angular for Enterprise Application Development books, has spoken at over 30 conferences, and is an Angular GDE Alumni. Doguhan has delivered solutions for Silicon Valley startups, Fortune 50 companies, and the U.S. Federal Government, and he is passionate about contributing to open-source projects and teaching.
Read more about Doguhan Uluca

Right arrow

Implementing a global spinner with NgRx/SignalState

In the Multi-step responsive forms section of Chapter 8, Recipes – Reusability, Forms, and Caching, and the Data tables with pagination section earlier in this chapter, I discussed the differences between localized spinners and global ones. A global spinner is the ultimate 80-20 solution to paper over UX issues stemming from UI elements not being ready for interaction while data loads. However, this will cause excessive full-screen interruptions in large applications with multiple on-screen components or background service workers loading data. In that case, most components will require local spinners instead.

With that in mind, let’s go after the 80-20 solution. We can use an HttpInterceptor to detect when an API call is made within the application. This allows us to show or hide a global spinner. However, if multiple calls are made concurrently, we must keep track of this, otherwise the global spinner may behave...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Angular for Enterprise Applications - Third Edition
Published in: Jan 2024Publisher: PacktISBN-13: 9781805127123

Author (1)

author image
Doguhan Uluca

Doguhan Uluca is a Principal Fellow at Excella in Washington, D.C., where he leads strategic initiatives and delivers critical systems. He has technical expertise in usability, mobility, performance, scalability, cybersecurity, and architecture. He is the author of the Angular for Enterprise Application Development books, has spoken at over 30 conferences, and is an Angular GDE Alumni. Doguhan has delivered solutions for Silicon Valley startups, Fortune 50 companies, and the U.S. Federal Government, and he is passionate about contributing to open-source projects and teaching.
Read more about Doguhan Uluca