- When restoring state, restore the full state rather than just the
navigationId.- Can this cause a problem?
- Talk to Igor about this possibly breaking change. Might need to only restore state when there is a
navigationIdpresent so the types don't cause a breakage. - feat(router): restore whole
stateobject when navigating back to a page managed by Angular router
- Allow passing of
statetonavigateandnavigateByUrl. - Merge this
statewithnavigationIdwhen applicable. Find where we are settingnavigationIdas I think it is there on every navigation as currently implemented.- feat(router): allow passing
statetonavigateandnavigateByIdmethods
- feat(router): allow passing
- Allow
stateto be set forrouterLinkdirectives- feat(router): allow passing
statetorouterLinkdirectives
- feat(router): allow passing
- Wire in
stateto all events.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Existing API | |
| export interface NavigationExtras { | |
| relativeTo?: ActivatedRoute|null; | |
| queryParams?: Params|null; | |
| fragment?: string; | |
| preserveQueryParams?: boolean; | |
| queryParamsHandling?: QueryParamsHandling|null; | |
| preserveFragment?: boolean; | |
| skipLocationChange?: boolean; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Guards execute in a similar way to how they used to. However, there is now prioritization involved. A guard | |
| * closest to the root of the application takes priority, such that if guards for child routes return `false` | |
| * or a `UrlTree` but parents haven't resolved yet, we will wait for the parents to resolve first. The highest | |
| * prioirty failure (either `false` or `UrlTree` redirect) will take priority. | |
| * | |
| * If a `UrlTree` is returned from a guard, the current navigation will be cancelled (firing a `NavigationCancel` | |
| * event) and a new navigation will be kicked off to the redirected URL. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": 2, | |
| "tree": { | |
| "name": "root", | |
| "children": [ | |
| { | |
| "name": "assets/index-625bb411.js", | |
| "children": [ | |
| { | |
| "name": "src", |
React Router recently made a major shift with the v6 router. There are some key improvements we want to take advantage of. Some of these include:
- More intelligent routing, not relying on the
exactprop or the order of the route definitions. - Relative routes and linking. No more parent route paths for nested routes.
- New
Outletcomponent, allowing us to decide where to render child routes. - Smaller bundle sizes
- Suspense-aware navigation using the new
navigatefunction (rather than usinghistoryAPI in v5) - In the most current versions of React Router, a new set of data-enabled APIs have been added, giving us access to functionality like pre-route loading, route-level form handling, and better route error handling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Open a new window | |
| var logWindow = window.open("", "LogWindow", "width=600,height=400"); | |
| // Write initial HTML content to the new window | |
| logWindow.document.write(` | |
| <html> | |
| <head> | |
| <title>External Log Window</title> | |
| <style> | |
| body { font-family: monospace; background-color: #f0f0f0; padding: 10px; } |
OlderNewer