From 1a8b5ea36b3c405865d3c09799def05c9e28822d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de> Date: Mon, 29 Oct 2018 11:55:12 +0100 Subject: [PATCH] Add routing module for shared components --- .../shared/shared-routing.module.ts | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/app/components/shared/shared-routing.module.ts diff --git a/src/app/components/shared/shared-routing.module.ts b/src/app/components/shared/shared-routing.module.ts new file mode 100644 index 000000000..2d37a131d --- /dev/null +++ b/src/app/components/shared/shared-routing.module.ts @@ -0,0 +1,34 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { LoginPageComponent } from './login-page/login-page.component'; +import { FooterImprintComponent } from './footer-imprint/footer-imprint.component'; +import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; + + +const routes: Routes = [ + { + path: '', + redirectTo: '/home', + pathMatch: 'full' + }, + { + path: 'home', + component: LoginPageComponent + }, + { + path: 'imprint', + component: FooterImprintComponent + }, + { + path: '**', + component: PageNotFoundComponent + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) + +export class SharedRoutingModule { +} -- GitLab