Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.23 KB

LAB.md

File metadata and controls

44 lines (31 loc) · 1.23 KB

🧲 Lab 20 Alternative - Mock Store

⏰ Estimated time: 5 minutes

🏋️‍♀️ Steps :

For now, our store project has no API when it is deployed. Hence, it is only displaying the header.

  1. If you removed your fake-api/index.ts from the store, let's re-add it

  2. Import it in your apps/store/src/app/app.component.ts

    🐳 Hint
    import { getAllGames } from '../fake-api/index';
    //....
    games = getAllGames();
    <bg-hoard-header [title]="title"></bg-hoard-header>
    <div class="container">
       <div class="games-layout">
         <mat-card
           class="game-card"
           *ngFor="let game of games" <---- HERE (remove the async pipe)

  3. Build and deploy your store project. Your deployed version should now be showing some games.

    ⚠️ Clicking on games and displaying game details will still not work. We can fix that later.

    screenshot of lab20 result

➡️ Next lab ➡️