Skip to main content
InterviewHubPRO
Section Overview
Q73

Question 73 of 283

Part 3: Angular Router, Navigation & SSR Universal (63 - 75)

26%
Angular Master (283 Qs)•Part 3: Angular Router, Navigation & SSR Universal (63 - 75)

What is the purpose of Wildcard route?

junior LevelCode ExampleRoutingSSR & Hydration

If the URL doesn't match any predefined routes then it causes the router to throw an error and crash the app. In this case, you can use wildcard route. A wildcard route has a path consisting of two asterisks to match every URL.

For example, you can define PageNotFoundComponent for wildcard route as below

javascript
{ path: '**', component: PageNotFoundComponent }