How to display current route as string


#1

I just made a 404 page to catch any unknown routes, I would like to display on this page not just a “page not found” message, but one that includes whatever string used as the route.

If user goes to localhost:4200/asfsagsagd, I would like 404 router template to say: Page “asfsagsagd” not found.


#2

via initialization object inject the router into controllers, then it can be called in any template via {{router.url}}


#3

Check out this documentation for wildcard routes.

https://guides.emberjs.com/v2.6.0/routing/defining-your-routes/#toc_wildcard-globbing-routes