Page MenuHomec4science

app.routing.ts
No OneTemporary

File Metadata

Created
Fri, Nov 15, 08:14

app.routing.ts

import {RouterModule, Routes} from '@angular/router';
import {HomeComponent} from './home.component';
import {ImpressumComponent} from './impressum.component';
import {ProjectComponent} from './project.component';
import {ContentViewTabComponentComponent} from './content-view-tab-component/content-view-tab-component.component';
import {CONTENT_ROUTES} from './content-view-tab-component/content-view-routes';
import { CONTENT_VIEW_ROUTE, DOCUMENTATION_ROUTE, HOME_ROUTE, IMPRESSUM_ROUTE, PROJECT_ROUTE } from './constants';
const APP_ROUTES: Routes = [
{path: '', redirectTo: HOME_ROUTE, pathMatch: 'prefix'},
{path: HOME_ROUTE, component: HomeComponent},
{path: CONTENT_VIEW_ROUTE, component: ContentViewTabComponentComponent, children: CONTENT_ROUTES},
{path: PROJECT_ROUTE, component: ProjectComponent},
{path: IMPRESSUM_ROUTE, component: ImpressumComponent},
{path: '**', redirectTo: HOME_ROUTE, pathMatch: 'prefix'} // any other unknown url will be forwarded to home
];
export const routing = RouterModule.forRoot(APP_ROUTES);

Event Timeline