projects
/
examples
/
angular-tutorial
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Shipping-Component mit Data-Fetch über HTTP
[examples/angular-tutorial]
/
src
/
app
/
app.module.ts
diff --git
a/src/app/app.module.ts
b/src/app/app.module.ts
index
d6559fb
..
038c3cf
100644
(file)
--- a/
src/app/app.module.ts
+++ b/
src/app/app.module.ts
@@
-1,18
+1,34
@@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
+import { HttpClientModule } from '@angular/common/http';
import { AppComponent } from './app.component';
import { TopBarComponent } from './top-bar/top-bar.component';
import { AppComponent } from './app.component';
import { TopBarComponent } from './top-bar/top-bar.component';
+import { ProductListComponent } from './product-list/product-list.component';
+import { ProductDetailsComponent } from './product-details/product-details.component';
+import { ProductAlertsComponent } from './product-alerts/product-alerts.component';
+import { CartComponent } from './cart/cart.component';
+import { ShippingComponent } from './shipping/shipping.component';
@NgModule({
declarations: [
AppComponent,
@NgModule({
declarations: [
AppComponent,
- TopBarComponent
+ TopBarComponent,
+ ProductListComponent,
+ ProductDetailsComponent,
+ ProductAlertsComponent,
+ CartComponent,
+ ShippingComponent
],
imports: [
BrowserModule,
],
imports: [
BrowserModule,
+ HttpClientModule,
RouterModule.forRoot([
RouterModule.forRoot([
+ { path: '', component: ProductListComponent },
+ { path: 'products/:productId', component: ProductDetailsComponent },
+ { path: 'cart', component: CartComponent },
+ { path: 'shipping', component: ShippingComponent }
])
],
providers: [],
])
],
providers: [],