app-routing.module.ts 613 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
7
import { SubsystemComponent } from './subsystem/subsystem.component';

const routes: Routes = [
  { path: '', redirectTo: '/list', pathMatch: 'full' },
8
  { path: 'list', component: SubsystemListComponent },
9
10
11
12
13
14
15
16
  { path: 'subsystem/:id', component: SubsystemComponent },
];

@NgModule({
  imports: [ RouterModule.forRoot(routes, {scrollPositionRestoration: 'enabled'}) ],
  exports: [ RouterModule ]
})
export class AppRoutingModule {}