-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Description
Which @angular/* package(s) are relevant/related to the feature request?
router
Description
Currently, most SPA apps on the web implement a fake "loading" bar like you can see on GitHub when navigating between pages. In a real MPA app where it performs a full page reload browsers show a native loading indicator. This has been impossible to implement until now with SPA because there was no way to show browser's native loading indicator. But now there is a new browser api called the Navigation API, specifically designed for SPA apps that finally shows a native browser loader when navigating in SPA app. 🎉
Proposed solution
Implement the new Navigation API. Yes, it is a new and bleeding edge feature but for those users with browsers that already support it (like Chrome) I think it adds a really nice UX touch.
developer.chrome.com/docs/web-platform/navigation-api
developer.mozilla.org/en-US/docs/Web/API/Navigation_API
Demo:
https://gigantic-honored-octagon.glitch.me/
(In the demo, you can activate the Add an artificial two-second delay to all navigations (should impact the loading spinner/scroll restoration/focus reset/accessibility announcements). checkbox to see the native loader appearing on the tab when navigating)
Alternatives considered
None because this is a new API.
