What is the purpose of Wildcard route?
Answer:
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.
{ path: '**', component: PageNotFoundComponent }
ok, thats it for today!
No comments:
Post a Comment