Deepshikha Chaudhary
Deepshikha Chaudhary

Reputation: 398

In angular 2 no wildcard defined in route

While defining routes in angular 2 if I don't define wildcard route and try to hit an invalid url that doesn't exists. What will be the response?

Upvotes: 0

Views: 50

Answers (1)

Philipp Kief
Philipp Kief

Reputation: 8613

You will most likely get the following error if you call such a URL:

Error: Cannot match any routes. URL Segment: 'my-invalid-url' Error: Cannot match any routes.

And the application remains on the page that was loaded successfully most recently.

Upvotes: 1

Related Questions