Match a URL and keep route parameters live within an owned branch.
A route gives a URL a view and a lifetime. Parameters identify the record being displayed, while exact, nested, wildcard and fallback matches decide which branch should exist. A deep link must work on the initial HTTP request too.
Routers in one document share its real location. They are not independent toy browsers. This course deliberately places its routing exercise under the lesson's URL so it cannot silently compete with unrelated course routes.
Understand the moving parts
RouteState provides readable params and location. A compatible parameter change can retain a branch's local state; navigating away ends its owned work. Do not confuse that retention with global persistence.
Use the project links below and watch the actual address bar. Copy a project URL into a fresh tab. The lesson and selected project should render immediately without first visiting the course overview.
The project links match the :id route and state.params() supplies the live project readout. Both project URLs use the same lesson handler, including on a direct deep-link load. The standalone version includes the lesson paths without the surrounding course navigation.
Try it live
Open project one and then project two, inspect the URL, and reload the second deep link.
What to observe
The selected project matches the URL before and after reload. Course navigation still works.