app-routing.module.ts 748 Bytes
Newer Older
1
2
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
3
import { SubsystemListComponent } from './subsystem-list/subsystem-list.component';
4
5
6
import { SubsystemComponent } from './subsystem/subsystem.component';

const routes: Routes = [
Vitali Stupin's avatar
Vitali Stupin committed
7
  { path: '', component: SubsystemListComponent },
8
9
  { path: ':instance', component: SubsystemListComponent },
  { path: ':instance/:class/:member/:subsystem', component: SubsystemComponent },
Vitali Stupin's avatar
Vitali Stupin committed
10
11
  // Redirecting old catalogue app links
  { path: ':instance', redirectTo: '/:instance', pathMatch: 'prefix' }
12
13
14
15
16
17
];

@NgModule({
  imports: [ RouterModule.forRoot(routes, {scrollPositionRestoration: 'enabled'}) ],
  exports: [ RouterModule ]
})
Vitali Stupin's avatar
Vitali Stupin committed
18
export class AppRoutingModule {}