Introduced MainLayoutComponent with header and navbar for consistent app layout. Added HeaderComponent, NavbarComponent, ScheduleComponent, and MainComponent. Updated routing to use MainLayout for main and schedule pages. Renamed home-component to home and main-page to main, removing obsolete main-page files.
33 lines
989 B
TypeScript
33 lines
989 B
TypeScript
import { NgModule } from '@angular/core';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
import { PocModelComponent } from './poc-model-component/poc-model-component';
|
|
import { HomeComponent } from './home/home.component';
|
|
import { MainLayoutComponent } from './layouts/main-layout/main-layout.component';
|
|
import { MainComponent } from './main/main.component';
|
|
import { ScheduleComponent } from './schedule/schedule.component';
|
|
|
|
const routes: Routes = [
|
|
// Seiten ohne Layout
|
|
{ path: 'info', component: HomeComponent },
|
|
{ path: 'poc-model', component: PocModelComponent },
|
|
|
|
// Seiten mit MainLayout
|
|
{
|
|
path: '',
|
|
component: MainLayoutComponent,
|
|
children: [
|
|
{ path: '', component: MainComponent },
|
|
{ path: 'schedule', component: ScheduleComponent },
|
|
],
|
|
},
|
|
|
|
// Fallback-Route
|
|
{ path: '**', component: HomeComponent },
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forRoot(routes)],
|
|
exports: [RouterModule],
|
|
})
|
|
export class AppRoutingModule {}
|