---
title: 🔴 Master Dependancy Injection
description: Challenge 16 is about masjering how dependancy injection works
sidebar:
  order: 16
---

:::note
WIP: The following documentation will be reviewed and improved. However, you can still take on the challenge. If you don't understand a certain part, please feel free to reach out or create an issue.
:::

<div class="chip">Challenge #16</div>

## Information

To successfully complete this challenge, you will need to have a good understanding of how Dependency Injection works inside Angular.

The goal is to provide the CurrencyService at the row level, so that each row displays the correct currency. Currently, the CurrencyService is only provided at the table level, which results in an error as the same currency is displayed for each row, despite each product having a different currency.

One way to achieve this is by adding a second argument to the pipe, but this is not allowed.

## Statement

- Your task is to display the correct currency for each row.

## Constraints:

- You cannot modify the pipe.
- You cannot wrap the row inside a component, as this will break the layout.

---

:::note
Start the project by running: `npx nx serve di`.
:::

:::tip[Reminder]
Your PR title must start with <b>Answer:16</b>.
:::

<div class="article-footer">
  <a
    href="https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A16+label%3Aanswer"
    alt="Master Dependancy Injection community solutions">
    ❖ Community Answers
  </a>
  <a
    href='https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A16+label%3A'
    alt="Master Dependancy Injection solution author">
    ▶︎ Author Answer
  </a>
  </div>
