diff --git a/src/app/app-routing-module.ts b/src/app/app-routing-module.ts new file mode 100644 index 0000000..915571e --- /dev/null +++ b/src/app/app-routing-module.ts @@ -0,0 +1,26 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { Router, RouterModule } from '@angular/router'; + +import { NotFoundComponent } from './not-found/not-found.component'; +import {DashboardComponent} from './dashboard/dashboard.component'; +import {ImpressumComponent} from './impressum/impressum.component'; + +export const appRoutes = [ + { path: 'impressum', component: ImpressumComponent }, + { path: 'dashboard', component: DashboardComponent }, + { path: '', pathMatch: 'full', redirectTo: '/dashboard' }, + { path: '**', component: NotFoundComponent } +]; + +@NgModule({ + imports: [ + CommonModule, + RouterModule.forRoot(appRoutes) + ], + declarations: [], + exports: [ + RouterModule + ] +}) +export class AppRoutingModule { } diff --git a/src/app/app.component.html b/src/app/app.component.html index 4d105e8..44314b4 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,7 +1,7 @@
- +