From ffbb7e6d528f798d2dc82feb059006d32f519cc9 Mon Sep 17 00:00:00 2001 From: Kam Date: Sun, 30 Aug 2026 16:33:14 +0300 Subject: [PATCH] docs: correct stale visibleLines ranges in the first-app tutorial The tutorial's example files shifted without the README line references following, so several steps point at the wrong code. In two cases every requested line is past the end of the file; on the inputs step this renders as a code block with no lines visible at all. (cherry picked from commit 46b02cc18122ee4221e41f518ed65d53ea21c4d1) --- .../tutorials/first-app/steps/01-hello-world/README.md | 2 +- .../content/tutorials/first-app/steps/05-inputs/README.md | 2 +- .../content/tutorials/first-app/steps/09-services/README.md | 2 +- .../content/tutorials/first-app/steps/10-routing/README.md | 4 ++-- .../content/tutorials/first-app/steps/12-forms/README.md | 2 +- .../src/content/tutorials/first-app/steps/14-http/README.md | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/adev/src/content/tutorials/first-app/steps/01-hello-world/README.md b/adev/src/content/tutorials/first-app/steps/01-hello-world/README.md index 9c45f96dc35..8baa929d579 100644 --- a/adev/src/content/tutorials/first-app/steps/01-hello-world/README.md +++ b/adev/src/content/tutorials/first-app/steps/01-hello-world/README.md @@ -100,7 +100,7 @@ In your IDE: 1. In `app.ts`, in the `App` class definition, replace the `title` line with this code to change the component title. - + Then, save the changes you made to `app.ts`. diff --git a/adev/src/content/tutorials/first-app/steps/05-inputs/README.md b/adev/src/content/tutorials/first-app/steps/05-inputs/README.md index df1d40976aa..d1636b6d3e5 100644 --- a/adev/src/content/tutorials/first-app/steps/05-inputs/README.md +++ b/adev/src/content/tutorials/first-app/steps/05-inputs/README.md @@ -30,7 +30,7 @@ In the code editor, import the `input` helper method from `@angular/core` into t Add a required property called `housingLocation` and initialize it using `input.required()` with the type `HousingLocationInfo`. - + You have to invoke the `required` method on `input` to indicate that the parent component must provide a value. In our example application, we know this value will always be passed in — this is by design. The `.required()` call ensures that the TypeScript compiler enforces this and treats the property as non-nullable when this component is used in a template. diff --git a/adev/src/content/tutorials/first-app/steps/09-services/README.md b/adev/src/content/tutorials/first-app/steps/09-services/README.md index ecc0742137d..46b3fdf0d63 100644 --- a/adev/src/content/tutorials/first-app/steps/09-services/README.md +++ b/adev/src/content/tutorials/first-app/steps/09-services/README.md @@ -57,7 +57,7 @@ In the **Edit** pane of your IDE: 1. Inside the `HousingService` class, paste these functions after the data you just copied. These functions allow dependencies to access the service's data. - + 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. diff --git a/adev/src/content/tutorials/first-app/steps/10-routing/README.md b/adev/src/content/tutorials/first-app/steps/10-routing/README.md index 726eb9781e3..db18b91ed28 100644 --- a/adev/src/content/tutorials/first-app/steps/10-routing/README.md +++ b/adev/src/content/tutorials/first-app/steps/10-routing/README.md @@ -37,11 +37,11 @@ In this lesson, you will enable routing in your application to navigate to the d 2. In `main.ts`, make the following updates to enable routing in the application: 1. Import the routes file and the `provideRouter` function: - + 1. Update the call to `bootstrapApplication` to include the routing configuration: - + 3. In `src/app/app.ts`, update the component to use routing: 1. Add file level imports for the router directives `RouterOutlet` and `RouterLink`: diff --git a/adev/src/content/tutorials/first-app/steps/12-forms/README.md b/adev/src/content/tutorials/first-app/steps/12-forms/README.md index e6f26e5573a..fe1ed0e4d6d 100644 --- a/adev/src/content/tutorials/first-app/steps/12-forms/README.md +++ b/adev/src/content/tutorials/first-app/steps/12-forms/README.md @@ -25,7 +25,7 @@ In the **Edit** pane of your IDE: 1. In `src/app/housing.service.ts`, inside the `HousingService` class, paste this method at the bottom of the class definition. - + 1. Confirm that the app builds without error. Correct any errors before you continue to the next step. diff --git a/adev/src/content/tutorials/first-app/steps/14-http/README.md b/adev/src/content/tutorials/first-app/steps/14-http/README.md index 05b510549d4..ef2c518f715 100644 --- a/adev/src/content/tutorials/first-app/steps/14-http/README.md +++ b/adev/src/content/tutorials/first-app/steps/14-http/README.md @@ -156,13 +156,13 @@ The data source has been configured, the next step is to update your web app to 1. Add a string property called `url` and set its value to `'http://localhost:3000/locations'` - + This code will result in errors in the rest of the file because it depends on the `housingLocationList` property. We're going to update the service methods next. 1. Update the `getAllHousingLocations` function to make a call to the web server you configured. - + The code now uses asynchronous code to make a **GET** request over HTTP. @@ -172,7 +172,7 @@ The data source has been configured, the next step is to update your web app to HELPFUL: Notice the `fetch` method has been updated to _query_ the data for location with a matching `id` property value. See [URL Search Parameter](https://developer.mozilla.org/en-US/docs/Web/API/URL/search) for more information. - + 1. Once all the updates are complete, your updated service should match the following code.