1. Inside the `HousingService` class, paste these functions after the data you just copied.
These functions allow dependencies to access the service's data.
<code-exampleheader="Service functions in src/app/housing.service.ts"path="first-app-lesson-09/src/app/housing.service.ts"region="service-functions"></code-example>
You will need these functions in a future lesson. For now, it is enough to understand that these functions return either a specific `HousingLocation` by id or the entire list.
<code-exampleheader="Import HousingLocation type in src/app/housing.service.ts"path="first-app-lesson-09/src/app/housing.service.ts"region="import-housing-location"></code-example>
1. Confirm that the app builds without error.
Correct any errors before you continue to the next step.
1. At the top of `src/app/home/home.component.ts`, add the `inject` to the items imported from `@angular/core`. This will import the `inject` function into the `HomeComponent` class.
<code-exampleheader="Update to src/app/home/home.component.ts"path="first-app-lesson-09/src/app/home/home.component.ts"region="import-inject"></code-example>
<code-exampleheader="Add import to src/app/home/home.component.ts"path="first-app-lesson-09/src/app/home/home.component.ts"region="import-service"></code-example>
1. From `HomeComponent`, delete the `housingLocationList` array entries and assign `housingLocationList` the value of empty array (`[]`). In a few steps you will update the code to pull the data from the `HousingService`.
1. In `HomeComponent`, add the following code to inject the new service and initialize the data for the app. The `constructor` is the first function that runs when this component is created. The code in the `constructor` will assign the `housingLocationList` the value returned from the call to `getAllHousingLocations`.
<code-exampleheader="Initialize data from service in src/app/home/home.component.ts"path="first-app-lesson-09/src/app/home/home.component.ts"region="use-new-service"></code-example>
1. Save the changes to `src/app/home/home.component.ts` and confirm your app builds without error.
Correct any errors before you continue to the next step.