Skip to content

task#14 add a route auctions

bacn edited this page Sep 16, 2020 · 1 revision

Add a route /auctions

  1. Import your AuctionListComponent to your routing file
  2. Add a route for your AuctionListComponent
  3. Add your routing to the imports of your module

Hints

File app.routing.ts

The path /auctions shall show to the AuctionListComponent.

export const routes: Routes = [
  {
    path: 'auctions',
    component: AuctionListComponent
  }
];

File app.module.ts

We need to define our routing in the app.module.ts file. This step can be skipped if the routing module has been created at project start.

@NgModule({
  imports: [
    AppRoutingModule
  ]
})

Clone this wiki locally