Return to site

ANGULAR INTERVIEW QUESTION: What is the purpose of path "**" route?

· ngInterview,fullstack

When you hit a URL not handled by your application, the Angular router will raise an exception.

The route '**" prevents such exception by defining a generic route catching any unhandled otherwise page URLs.

You add in your routes:

Put that route in the end because Angular process the routes in a top-down order: