-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Wild card routing for some specific URL not working #49034
Description
Which @angular/* package(s) are the source of the bug?
router
Is this a regression?
Yes
Description
This issue is intended for a special route edge case, citing official documentation for the same.
So I've developed an app with angular and used inbuilt routing provided by angular. Let me narrate the scenario:
There are various routes in the application in which wild card routing is added at the very end to show desired not-found component page. So URLs are like
https://mysite/api/books
https://mysite/api/users
etc...
so if there is an invalid URLs such as https://mysite/api/87*hfaabooks, then not-found component shown correctly as I've added { path: '**', component: <not-found-component>, pathMatch: 'full' } in the array of routes in appRoutingModule. But when an URL is like https://mysite/65%^dfhapi/books , we can observe invalid characters aren't added in the very last route instead with api word in the URL, so in this case it is redirecting to home page but as the URL is still invalid I want user to navigate to not-found-component.
Would like to if I'm missing anything, thanks in advance.
-Shubham
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run ng version)
No response
Anything else?
No response