This is exactly needed.
I was just staring at a white screen between routes and had no idea where to even start.
The inline script trick is smart, but I'm a little worried about my index.html getting messy. Does this approach hold up well on bigger apps, or does it start to feel a bit hacked together?
How to make splash screen with progress tracking in Angular?
5 Comments
@[Gimi] It might feel a bit hacky, but it’s actually a deliberate performance optimization. On slow or mobile networks, you want to avoid that "Flash of White" before the browser even starts fetching your JS. Inlining is a zero-latency solution, which is why it's the gold standard for this specific use case.
You're right that a complex splash screen can clutter index.html. In large commercial projects, we solve this by keeping the splash code in separate files and injecting them into index.html during the CI/CD build process. This gives you the best of both worlds: clean source code and an optimized production build. ;]
You might think Server-Side Rendering (SSR) solves this, but it actually solves a different problem. SSR delivers the HTML structure quickly for SEO, but the app still needs to Hydrate (download and execute JS) to become interactive. If your initialization logic is heavy, SSR leaves the user with a "frozen" page. An inline splash screen covers that "uncanny valley" where the app looks ready but isn't responding to clicks yet.
Let me know if this clarified your doubts! HMU if you have any other questions.
@[Arkadiusz Pabian] Thanks for the clarification, yes, that makes total sense. It’s a classic tradeoff between source code cleanliness and the critical first 500ms of the user experience. I think the CI/CD injection you mentioned is the real grown-up way to do this without turning the index file into a disaster. It makes me wonder, do you think we're reaching the limit of what we can optimize on the client side before we're forced to move even more logic back to the edge?
@[Gimi] Yeah, it definitely does, but not for every scenario.
Rendering data on the client side is easy and delivers for small to mid-sized apps, but as your bundle grows, it gets harder and harder to maintain. For large apps, implementing SSR with a proper Edge architecture seems to be the only rational move, though I wouldn't recommend it for every project. It comes with its own learning curve - you have to start thinking about the environment where your code is actually executing.
But if you have a specific goal in mind, like getting the most out of SEO or minimizing the initial time-to-content, SSR just makes sense out of the box. Think of blogs or e-commerce sites, for example. There, each delay literally costs money. We’re basically moving the heavy lifting back to the server (the Edge) to keep the client-side experience as light as possible.
Please log in to add a comment.
Please log in to comment on this post.
More Posts
- © 2026 Coder Legion
- Feedback / Bug
- Privacy
- About Us
- Contacts
- You Tube
- Tiktok
- Premium Subscription
- Terms of Service
- Early Builders
Related Jobs
- Java Developer/Angular JSSonsoft · Full time · Bentonville, AR
- Angular JS DeveloperSonsoft · Full time · Houston, TX
- Sr. Angular DeveloperCedent Consulting · Full time · Dallas, TX
Commenters (This Week)
Contribute meaningful comments to climb the leaderboard and earn badges!