Skip to content

Commit 8f9d13e

Browse files
sEverAndrewKushnir
authored andcommitted
fix(docs-infra): fix wrong visibleLines numbers in docs-code blocks (angular#61909)
Many of these were shifted by one line Also fixing one minor typo PR Close angular#61909
1 parent cfb0dc2 commit 8f9d13e

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

adev/src/content/tutorials/first-app/steps/01-hello-world/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ In your IDE:
9494
1. Next, open `first-app/src/app/app.ts`.
9595
1. In `app.ts`, in the `@Component` definition, replace the `template` line with this code to change the text in the app component.
9696

97-
<docs-code header="Replace in src/app/app.ts" path="adev/src/content/tutorials/first-app/steps/02-Home/src/app/app.ts" visibleLines="[7,9]"/>
97+
<docs-code header="Replace in src/app/app.ts" path="adev/src/content/tutorials/first-app/steps/02-Home/src/app/app.ts" visibleLines="[6,8]"/>
9898

9999
1. In `app.ts`, in the `App` class definition, replace the `title` line with this code to change the component title.
100100

101-
<docs-code header="Replace in src/app/app.ts" path="adev/src/content/tutorials/first-app/steps/02-Home/src/app/app.ts" visibleLines="[12,14]"/>
101+
<docs-code header="Replace in src/app/app.ts" path="adev/src/content/tutorials/first-app/steps/02-Home/src/app/app.ts" visibleLines="[11,13]"/>
102102

103103
Then, save the changes you made to `app.ts`.
104104

adev/src/content/tutorials/first-app/steps/02-Home/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ In the **Edit** pane of your IDE:
7070

7171
1. In `app.ts`, in `@Component`, update the `imports` array property and add `Home`.
7272

73-
<docs-code header="Replace in src/app/app.ts" path="adev/src/content/tutorials/first-app/steps/03-HousingLocation/src/app/app.ts" visibleLines="[7]"/>
73+
<docs-code header="Replace in src/app/app.ts" path="adev/src/content/tutorials/first-app/steps/03-HousingLocation/src/app/app.ts" visibleLines="[6]"/>
7474

7575
1. In `app.ts`, in `@Component`, update the `template` property to include the following HTML code.
7676

77-
<docs-code header="Replace in src/app/app.ts" path="adev/src/content/tutorials/first-app/steps/03-HousingLocation/src/app/app.ts" visibleLines="[8,17]"/>
77+
<docs-code header="Replace in src/app/app.ts" path="adev/src/content/tutorials/first-app/steps/03-HousingLocation/src/app/app.ts" visibleLines="[7,16]"/>
7878

7979
1. Save your changes to `app.ts`.
8080
1. If `ng serve` is running, the app should update.
@@ -100,7 +100,7 @@ In the **Edit** pane of your IDE:
100100
1. In the `first-app` directory, open `home.ts` in the editor.
101101
1. In `home.ts`, in `@Component`, update the `template` property with this code.
102102

103-
<docs-code header="Replace in src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/03-HousingLocation/src/app/home/home.ts" visibleLines="[8,15]"/>
103+
<docs-code header="Replace in src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/03-HousingLocation/src/app/home/home.ts" visibleLines="[7,14]"/>
104104

105105
1. Next, open `home.css` in the editor and update the content with these styles.
106106

adev/src/content/tutorials/first-app/steps/03-HousingLocation/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ In the **Edit** pane of your IDE:
5151

5252
1. Next update the `imports` property of the `@Component` metadata by adding `HousingLocation` to the array.
5353

54-
<docs-code header="Add HousingLocation to imports array in src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/04-interfaces/src/app/home/home.ts" visibleLines="[7]"/>
54+
<docs-code header="Add HousingLocation to imports array in src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/04-interfaces/src/app/home/home.ts" visibleLines="[6]"/>
5555

5656
1. Now the component is ready for use in the template for the `Home`. Update the `template` property of the `@Component` metadata to include a reference to the `<app-housing-location>` tag.
5757

58-
<docs-code header="Add housing location to the component template in src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/04-interfaces/src/app/home/home.ts" visibleLines="[8,18]"/>
58+
<docs-code header="Add housing location to the component template in src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/04-interfaces/src/app/home/home.ts" visibleLines="[7,17]"/>
5959

6060
</docs-step>
6161

adev/src/content/tutorials/first-app/steps/04-interfaces/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ There are a few more lessons to complete before that happens.
7070

7171
1. In `src/app/home/home.ts`, replace the empty `export class Home {}` definition with this code to create a single instance of the new interface in the component.
7272

73-
<docs-code header="Add sample data to src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/05-inputs/src/app/home/home.ts" visibleLines="[23,36]"/>
73+
<docs-code header="Add sample data to src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/05-inputs/src/app/home/home.ts" visibleLines="[22,35]"/>
7474

75-
1. Confirm that your `home.ts` file matches like this example.
75+
1. Confirm that your `home.ts` file matches this example.
7676

7777
<docs-code header="src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/05-inputs/src/app/home/home.ts" visibleLines="[1,36]" />
7878

adev/src/content/tutorials/first-app/steps/11-details-page/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ In this step, you will get the route parameter in the `Details`. Currently, the
7272
1. In the browser, click on one of the housing location's "Learn More" links and confirm that the numeric value displayed on the page matches the `id` property for that location in the data.
7373
</docs-step>
7474

75-
<docs-step title="Customize the `Detail`">
75+
<docs-step title="Customize the `Details`">
7676
Now that routing is working properly in the application this is a great time to update the template of the `Details` to display the specific data represented by the housing location for the route parameter.
7777

7878
To access the data you will add a call to the `HousingService`.

adev/src/content/tutorials/first-app/steps/12-forms/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ In the **Edit** pane of your IDE:
2525

2626
1. In `src/app/housing.service.ts`, inside the `HousingService` class, paste this method at the bottom of the class definition.
2727

28-
<docs-code header="Submit method in src/app/housing.service.ts" path="adev/src/content/tutorials/first-app/steps/13-search/src/app/housing.service.ts" visibleLines="[120,124]"/>
28+
<docs-code header="Submit method in src/app/housing.service.ts" path="adev/src/content/tutorials/first-app/steps/13-search/src/app/housing.service.ts" visibleLines="[120,124]"/>
2929

3030
1. Confirm that the app builds without error.
3131
Correct any errors before you continue to the next step.
@@ -38,21 +38,21 @@ In the **Edit** pane of your IDE, in `src/app/details/details.ts`:
3838

3939
1. After the `import` statements at the top of the file, add the following code to import the Angular form classes.
4040

41-
<docs-code header="Forms imports in src/app/details/details.ts" path="adev/src/content/tutorials/first-app/steps/13-search/src/app/details/details.ts" visibleLines="[6]"/>
41+
<docs-code header="Forms imports in src/app/details/details.ts" path="adev/src/content/tutorials/first-app/steps/13-search/src/app/details/details.ts" visibleLines="[6]"/>
4242

4343
1. In the `Details` decorator metadata, update the `imports` property with the following code:
4444

45-
<docs-code header="imports directive in src/app/details/details.ts" path="adev/src/content/tutorials/first-app/steps/13-search/src/app/details/details.ts" visibleLines="[10]"/>
45+
<docs-code header="imports directive in src/app/details/details.ts" path="adev/src/content/tutorials/first-app/steps/13-search/src/app/details/details.ts" visibleLines="[9]"/>
4646

4747
1. In the `Details` class, before the `constructor()` method, add the following code to create the form object.
4848

49-
<docs-code header="template directive in src/app/details/details.ts" path="adev/src/content/tutorials/first-app/steps/13-search/src/app/details/details.ts" visibleLines="[53,57]"/>
49+
<docs-code header="template directive in src/app/details/details.ts" path="adev/src/content/tutorials/first-app/steps/13-search/src/app/details/details.ts" visibleLines="[52,56]"/>
5050

5151
In Angular, `FormGroup` and `FormControl` are types that enable you to build forms. The `FormControl` type can provide a default value and shape the form data. In this example `firstName` is a `string` and the default value is empty string.
5252

5353
1. In the `Details` class, after the `constructor()` method, add the following code to handle the **Apply now** click.
5454

55-
<docs-code header="template directive in src/app/details/details.ts" path="adev/src/content/tutorials/first-app/steps/13-search/src/app/details/details.ts" visibleLines="[63,69]"/>
55+
<docs-code header="template directive in src/app/details/details.ts" path="adev/src/content/tutorials/first-app/steps/13-search/src/app/details/details.ts" visibleLines="[62,68]"/>
5656

5757
This button does not exist yet - you will add it in the next step. In the above code, the `FormControl`s may return `null`. This code uses the nullish coalescing operator to default to empty string if the value is `null`.
5858

adev/src/content/tutorials/first-app/steps/13-search/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ In this step, you'll update the `Home` class to store data in a new array proper
2020

2121
1. In `src/app/home/home.ts`, add new property to the class called `filteredLocationList`.
2222

23-
<docs-code header="Add the filtered results property" path="adev/src/content/tutorials/first-app/steps/14-http/src/app/home/home.ts" visibleLines="[30]"/>
23+
<docs-code header="Add the filtered results property" path="adev/src/content/tutorials/first-app/steps/14-http/src/app/home/home.ts" visibleLines="[29]"/>
2424

2525
The `filteredLocationList` hold the values that match the search criteria entered by the user.
2626

2727
1. The `filteredLocationList` should contain the total set of housing locations values by default when the page loads. Update the `constructor` for the `Home` to set the value.
2828

29-
<docs-code header="Set the value of filteredLocationList" path="adev/src/content/tutorials/first-app/steps/14-http/src/app/home/home.ts" visibleLines="[31,34]"/>
29+
<docs-code header="Set the value of filteredLocationList" path="adev/src/content/tutorials/first-app/steps/14-http/src/app/home/home.ts" visibleLines="[30,33]"/>
3030

3131
</docs-step>
3232

@@ -62,7 +62,7 @@ The template has been updated to bind the `filterResults` function to the `click
6262

6363
1. Update the `Home` class to include the implementation of the `filterResults` function.
6464

65-
<docs-code header="Add the filterResults function implementation" path="adev/src/content/tutorials/first-app/steps/14-http/src/app/home/home.ts" visibleLines="[35,44]"/>
65+
<docs-code header="Add the filterResults function implementation" path="adev/src/content/tutorials/first-app/steps/14-http/src/app/home/home.ts" visibleLines="[34,43]"/>
6666

6767
This function uses the `String` `filter` function to compare the value of the `text` parameter against the `housingLocation.city` property. You can update this function to match against any property or multiple properties for a fun exercise.
6868

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy