Quantcast
Viewing all articles
Browse latest Browse all 4828

Handling 404 Error in Ember with location type set as "hash"

@Kuka_123 wrote:

I have created a route called "page-not-found" in my ember application to catch all error routes. It is working fine when I type something erroneous in the URL like

http://localhost:4200/#/name-other-than-available-routes

Note the "hash" in the URL. I have specified my locationType as "hash". Now I want to redirect to the "page-not-found" route even if the URL doesn't contain hash in it. Currently, it is throwing me error "Cannot Get name-other-than-route" on the web page when I use like this.

http://localhost:4200/name-other-than-route

Is there any way to achieve this? Is this possible? Kindly assist me.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles