Direct navigation requests an application URL directly instead of reaching it through in-application links. It exposes whether a route can initialize correctly without earlier navigation steps. section 24.3.2
Opening an edit route directly
Requesting http://localhost:4200/form/edit/2 can produce an empty edit form when the data source assumes a product was selected through the table. The route parameter identifies the product, but the required data has not necessarily arrived. section 24.3.2
Server-side rendering makes application routes available for direct requests, including routes whose interactive forms are unsuitable for SSR. A browser guard can redirect guarded server-side requests to the default route while allowing browser navigation. section 27.4.6
Account for these direct-navigation behaviors:
- Route parameters can identify an operation and item, but the component must read them and load or select the corresponding data. section 24.3.2
- Do not rely on changing the form method alone: the SSR process does not create handlers for HTTP POST requests. section 27.4.6
