Created
August 7, 2018 20:15
-
-
Save wojtrawi/58b5d7e1238ae04af1607d5bf4277bc4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from '@angular/core'; | |
import { RouterModule, Routes } from '@angular/router'; | |
import { CarsPageComponent } from './containers/cars-page/cars-page.component'; | |
import { SelectedCarPageComponent } from './containers/selected-car-page/selected-car-page.component'; | |
const routes: Routes = [ | |
{ | |
path: 'cars', | |
children: [ | |
{ | |
path: '', | |
component: CarsPageComponent | |
}, | |
{ | |
path: ':carId', | |
component: SelectedCarPageComponent | |
} | |
] | |
} | |
] | |
@NgModule({ | |
imports: [RouterModule.forChild(routes)], | |
exports: [RouterModule] | |
}) | |
export class CarsRoutingModule { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment