Skip to content

Instantly share code, notes, and snippets.

@wojtrawi
Created August 7, 2018 20:15
Show Gist options
  • Save wojtrawi/58b5d7e1238ae04af1607d5bf4277bc4 to your computer and use it in GitHub Desktop.
Save wojtrawi/58b5d7e1238ae04af1607d5bf4277bc4 to your computer and use it in GitHub Desktop.
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