From 86a8cb1cda92506de2432dcb518bfc0fee636ddf Mon Sep 17 00:00:00 2001 From: nixa <4dmitr@gmail.com> Date: Fri, 3 Jun 2016 00:00:13 +0300 Subject: [PATCH] fix(route): fix #2, add a default handler for non registered routes --- src/app/app.component.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index f92d575f..22271f7d 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -36,6 +36,13 @@ import {layoutPaths} from './theme/theme.constants'; component: Pages, useAsDefault: true }, + // handle any non-registered route + // and simply redirects back to dashboard page + // you can specify any customer 404 page while it's not built in ito ng2-admin + { + path: '/**', + redirectTo: ['Pages'] + } ]) export class App {