mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs: Update wildcard route component to PageNotFoundComponent (#54570)
This PR enhances the Angular documentation by replacing the placeholder `<component-name>` with the actual `PageNotFoundComponent` in the wildcard route configuration. This update ensures that the documentation accurately reflects the recommended practice for handling page-not-found scenarios. Additionally, it addresses the issue where HTML entities like `<` were being displayed instead of the desired `<` symbol, resulting in clearer and more readable documentation for users. PR Close #54570
This commit is contained in:
@@ -184,7 +184,7 @@ The Angular router selects this route any time the requested URL doesn't match a
|
||||
To set up a wildcard route, add the following code to your `routes` definition.
|
||||
|
||||
```
|
||||
{ path: '**', component: <component-name> }
|
||||
{ path: '**', component: PageNotFoundComponent }
|
||||
```
|
||||
|
||||
The two asterisks, `**`, indicate to Angular that this `routes` definition is a wildcard route.
|
||||
|
||||
Reference in New Issue
Block a user