Skip to content

Commit

Permalink
#12 Redirect to 404 page
Browse files Browse the repository at this point in the history
  • Loading branch information
nhumblot committed May 10, 2021
1 parent f482ce1 commit 960a93b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
File renamed without changes.
5 changes: 3 additions & 2 deletions src/routing/Router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ class Routing {
}

private _notFoundRoute(context: PageJS.Context) {
console.error(`Route not found : ${context.path} ! Redirecting to home...`);
this.navigateToHome();
let notFoundUrl: string = window.location.protocol + '//' + window.location.host + '/404.html';
console.error(`Route not found : ${context.path} ! Redirecting to ${notFoundUrl}`);
window.location.href = notFoundUrl;
}

public navigateToRendezVousAvecDepartement(codeDepartement: string, pathLibelleDepartement: string) {
Expand Down

0 comments on commit 960a93b

Please sign in to comment.