1 import { BrowserModule } from '@angular/platform-browser';
2 import { NgModule } from '@angular/core';
3 import { RouterModule } from '@angular/router';
5 import { AppComponent } from './app.component';
6 import { TopBarComponent } from './top-bar/top-bar.component';
7 import { ProductListComponent } from './product-list/product-list.component';
8 import { ProductDetailsComponent } from './product-details/product-details.component';
15 ProductDetailsComponent
19 RouterModule.forRoot([
20 { path: '', component: ProductListComponent },
21 { path: 'products/:productId', component: ProductDetailsComponent }
25 bootstrap: [AppComponent]
27 export class AppModule { }