1 import { BrowserModule } from '@angular/platform-browser';
2 import { NgModule } from '@angular/core';
3 import { RouterModule } from '@angular/router';
4 import { ReactiveFormsModule } from '@angular/forms';
5 import { HttpClientModule } from '@angular/common/http';
7 import { AppComponent } from './app.component';
8 import { TopBarComponent } from './top-bar/top-bar.component';
9 import { ProductListComponent } from './product-list/product-list.component';
10 import { ProductDetailsComponent } from './product-details/product-details.component';
11 import { ProductAlertsComponent } from './product-alerts/product-alerts.component';
12 import { CartComponent } from './cart/cart.component';
13 import { ShippingComponent } from './shipping/shipping.component';
20 ProductDetailsComponent,
21 ProductAlertsComponent,
29 RouterModule.forRoot([
30 { path: '', component: ProductListComponent },
31 { path: 'products/:productId', component: ProductDetailsComponent },
32 { path: 'cart', component: CartComponent },
33 { path: 'shipping', component: ShippingComponent }
37 bootstrap: [AppComponent]
39 export class AppModule { }