X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=src%2Fapp%2Fapp.module.ts;h=9fa5aad8346145e8a61e9f140cd7e9b346869f95;hb=407dfe41df942c3079dee61e1fc1ed6094bb3bd5;hp=f65716351aa5930fea545e1e3f016e2980c1f483;hpb=4ba477444ea001193392246db5dc4818b180e271;p=examples%2Fangular-tutorial diff --git a/src/app/app.module.ts b/src/app/app.module.ts index f657163..9fa5aad 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,14 +1,30 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; +import { RouterModule } from '@angular/router'; 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'; @NgModule({ declarations: [ - AppComponent + AppComponent, + TopBarComponent, + ProductListComponent, + ProductDetailsComponent, + ProductAlertsComponent, + CartComponent ], imports: [ - BrowserModule + BrowserModule, + RouterModule.forRoot([ + { path: '', component: ProductListComponent }, + { path: 'products/:productId', component: ProductDetailsComponent }, + { path: 'cart', component: CartComponent } + ]) ], providers: [], bootstrap: [AppComponent]