Skip to content

Commit c4e7ac1

Browse files
SkyZeroZxAndrewKushnir
authored andcommitted
docs: fixed tutorial steps with identation formatting
1 parent a8fac4c commit c4e7ac1

11 files changed

Lines changed: 162 additions & 159 deletions

File tree

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

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -63,26 +63,26 @@ In this step, you add the new component, `Home` to your app's root component, `A
6363

6464
In the **Edit** pane of your IDE:
6565

66-
1. Open `app.ts` in the editor.
67-
1. In `app.ts`, import `Home` by adding this line to the file level imports.
66+
1. Open `app.ts` in the editor.
67+
1. In `app.ts`, import `Home` by adding this line to the file level imports.
6868

69-
<docs-code header="Import Home in src/app/app.ts" path="adev/src/content/tutorials/first-app/steps/03-HousingLocation/src/app/app.ts" visibleLines="[2]"/>
69+
<docs-code header="Import Home in src/app/app.ts" path="adev/src/content/tutorials/first-app/steps/03-HousingLocation/src/app/app.ts" visibleLines="[2]"/>
7070

71-
1. In `app.ts`, in `@Component`, update the `imports` array property and add `Home`.
71+
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="[6]"/>
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

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

77-
<docs-code language="angular-ts" header="Replace in src/app/app.ts" path="adev/src/content/tutorials/first-app/steps/03-HousingLocation/src/app/app.ts" visibleLines="[7,16]"/>
77+
<docs-code language="angular-ts" 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

79-
1. Save your changes to `app.ts`.
80-
1. If `ng serve` is running, the app should update.
81-
If `ng serve` is not running, start it again.
82-
_Hello world_ in your app should change to _home works!_ from the `Home`.
83-
1. Check the running app in the browser and confirm that the app has been updated.
79+
1. Save your changes to `app.ts`.
80+
1. If `ng serve` is running, the app should update.
81+
If `ng serve` is not running, start it again.
82+
_Hello world_ in your app should change to _home works!_ from the `Home`.
83+
1. Check the running app in the browser and confirm that the app has been updated.
8484

85-
<img alt="browser frame of page displaying the text 'home works!'" src="assets/images/tutorials/first-app/homes-app-lesson-02-step-2.png">
85+
<img alt="browser frame of page displaying the text 'home works!'" src="assets/images/tutorials/first-app/homes-app-lesson-02-step-2.png">
8686

8787
</docs-step>
8888

@@ -97,22 +97,20 @@ Note that, this step just adds the search elements to the layout without any fun
9797

9898
In the **Edit** pane of your IDE:
9999

100-
1. In the `first-app` directory, open `home.ts` in the editor.
101-
1. In `home.ts`, in `@Component`, update the `template` property with this code.
100+
1. In the `first-app` directory, open `home.ts` in the editor.
101+
1. In `home.ts`, in `@Component`, update the `template` property with this code.
102102

103-
<docs-code language="angular-ts" header="Replace in src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/03-HousingLocation/src/app/home/home.ts" visibleLines="[5,12]"/>
103+
<docs-code language="angular-ts" header="Replace in src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/03-HousingLocation/src/app/home/home.ts" visibleLines="[5,12]"/>
104104

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

107-
NOTE: In the browser, these can go in `src/app/home/home.ts` in the `styles` array.
107+
NOTE: In the browser, these can go in `src/app/home/home.ts` in the `styles` array.
108108

109-
<docs-code header="Replace in src/app/home/home.css" path="adev/src/content/tutorials/first-app/steps/03-HousingLocation/src/app/home/home.css"/>
109+
<docs-code header="Replace in src/app/home/home.css" path="adev/src/content/tutorials/first-app/steps/03-HousingLocation/src/app/home/home.css"/>
110110

111-
1. Confirm that the app builds without error.
112-
You should find the filter query box and button in your app and they should be styled.
113-
Correct any errors before you continue to the next step.
111+
1. Confirm that the app builds without error. You should find the filter query box and button in your app and they should be styled. Correct any errors before you continue to the next step.
114112

115-
<img alt="browser frame of homes-app displaying logo, filter text input box and search button" src="assets/images/tutorials/first-app/homes-app-lesson-02-step-3.png">
113+
<img alt="browser frame of homes-app displaying logo, filter text input box and search button" src="assets/images/tutorials/first-app/homes-app-lesson-02-step-3.png">
116114
</docs-step>
117115

118116
</docs-workflow>

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,18 @@ In this step, you add the new component, `HousingLocation` to your app's `Home`,
4444

4545
In the **Edit** pane of your IDE:
4646

47-
1. Open `home.ts` in the editor.
48-
1. In `home.ts`, import `HousingLocation` by adding this line to the file level imports.
47+
1. Open `home.ts` in the editor.
48+
1. In `home.ts`, import `HousingLocation` by adding this line to the file level imports.
4949

50-
<docs-code header="Import HousingLocation in src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/04-interfaces/src/app/home/home.ts" visibleLines="[2]"/>
50+
<docs-code header="Import HousingLocation in src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/04-interfaces/src/app/home/home.ts" visibleLines="[2]"/>
5151

52-
1. Next update the `imports` property of the `@Component` metadata by adding `HousingLocation` to the array.
52+
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="[6]"/>
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

56-
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.
56+
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 language="angular-ts" 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]"/>
58+
<docs-code language="angular-ts" 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

@@ -70,7 +70,7 @@ In this step, you will copy over the pre-written styles for the `HousingLocation
7070

7171
1. Save your code, return to the browser and confirm that the app builds without error. You should find the message "housing-location works!" rendered to the screen.Correct any errors before you continue to the next step.
7272

73-
<img alt="browser frame of homes-app displaying logo, filter text input box and search button and the message 'housing-location works!" src="assets/images/tutorials/first-app/homes-app-lesson-03-step-2.png">
73+
<img alt="browser frame of homes-app displaying logo, filter text input box and search button and the message 'housing-location works!" src="assets/images/tutorials/first-app/homes-app-lesson-03-step-2.png">
7474

7575
</docs-step>
7676

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ In the **Terminal** pane of your IDE:
4444
<docs-step title="Add properties to the new interface">
4545
This step adds the properties to the interface that your app needs to represent a housing location.
4646

47-
1. In the **Terminal** pane of your IDE, start the `ng serve` command, if it isn't already running, to build the app and serve it to `http://localhost:4200`.
48-
1. In the **Edit** pane of your IDE, open the `src/app/housinglocation.ts` file.
49-
1. In `housinglocation.ts`, replace the default content with the following code to make your new interface to match this example.
47+
1. In the **Terminal** pane of your IDE, start the `ng serve` command, if it isn't already running, to build the app and serve it to `http://localhost:4200`.
48+
1. In the **Edit** pane of your IDE, open the `src/app/housinglocation.ts` file.
49+
1. In `housinglocation.ts`, replace the default content with the following code to make your new interface to match this example.
5050

51-
<docs-code header="Update src/app/housinglocation.ts to match this code" path="adev/src/content/tutorials/first-app/steps/05-inputs/src/app/housinglocation.ts" visibleLines="[1,10]" />
51+
<docs-code header="Update src/app/housinglocation.ts to match this code" path="adev/src/content/tutorials/first-app/steps/05-inputs/src/app/housinglocation.ts" visibleLines="[1,10]" />
5252

53-
1. Save your changes and confirm the app does not display any errors. Correct any errors before you continue to the next step.
53+
1. Save your changes and confirm the app does not display any errors. Correct any errors before you continue to the next step.
5454

5555
At this point, you've defined an interface that represents data about a housing location including an `id`, `name`, and location information.
5656
</docs-step>
@@ -62,28 +62,28 @@ In this step, you create an instance of the interface and assign some sample dat
6262
You won't see this sample data appear in your app yet.
6363
There are a few more lessons to complete before that happens.
6464

65-
1. In the **Terminal** pane of your IDE, run the `ng serve` command, if it isn't already running, to build the app and serve your app to `http://localhost:4200`.
66-
1. In the **Edit** pane of your IDE, open `src/app/home/home.ts`.
67-
1. In `src/app/home/home.ts`, add this import statement after the existing `import` statements so that `Home` can use the new interface.
65+
1. In the **Terminal** pane of your IDE, run the `ng serve` command, if it isn't already running, to build the app and serve your app to `http://localhost:4200`.
66+
1. In the **Edit** pane of your IDE, open `src/app/home/home.ts`.
67+
1. In `src/app/home/home.ts`, add this import statement after the existing `import` statements so that `Home` can use the new interface.
6868

69-
<docs-code language="angular-ts" header="Import Home in src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/05-inputs/src/app/home/home.ts" visibleLines="[3]"/>
69+
<docs-code language="angular-ts" header="Import Home in src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/05-inputs/src/app/home/home.ts" visibleLines="[3]"/>
7070

71-
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.
71+
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 language="angular-ts" 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]"/>
73+
<docs-code language="angular-ts" 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 this example.
75+
1. Confirm that your `home.ts` file matches this example.
7676

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

79-
By adding the `housingLocation` property of type `HousingLocation` to the `Home` class, we're able to confirm that the data matches the description of the interface. If the data didn't satisfy the description of the interface, the IDE has enough information to give us helpful errors.
79+
By adding the `housingLocation` property of type `HousingLocation` to the `Home` class, we're able to confirm that the data matches the description of the interface. If the data didn't satisfy the description of the interface, the IDE has enough information to give us helpful errors.
8080

81-
1. Save your changes and confirm the app does not have any errors. Open the browser and confirm that your application still displays the message "housing-location works!"
81+
1. Save your changes and confirm the app does not have any errors. Open the browser and confirm that your application still displays the message "housing-location works!"
8282

83-
<img alt="browser frame of homes-app displaying logo, filter text input box and search button and the message 'housing-location works!'" src="assets/images/tutorials/first-app/homes-app-lesson-03-step-2.png">
83+
<img alt="browser frame of homes-app displaying logo, filter text input box and search button and the message 'housing-location works!'" src="assets/images/tutorials/first-app/homes-app-lesson-03-step-2.png">
8484

85-
1. Correct any errors before you continue to the next step.
86-
</docs-step>
85+
1. Correct any errors before you continue to the next step.
86+
</docs-step>
8787

8888
</docs-workflow>
8989

adev/src/content/tutorials/first-app/steps/06-property-binding/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ In the code editor:
2828
1. In the template property of the `@Component` decorator, update the code to match the code below:
2929
<docs-code language="angular-ts" header="Add housingLocation property binding" path="adev/src/content/tutorials/first-app/steps/07-dynamic-template-values/src/app/home/home.ts" visibleLines="[15,17]"/>
3030

31-
When adding a property binding to a component tag, we use the `[attribute] = "value"` syntax to notify Angular that the assigned value should be treated as a property from the component class and not a string value.
31+
When adding a property binding to a component tag, we use the `[attribute] = "value"` syntax to notify Angular that the assigned value should be treated as a property from the component class and not a string value.
3232

33-
The value on the right-hand side is the name of the property from the `Home`.
33+
The value on the right-hand side is the name of the property from the `Home`.
3434

35-
</docs-step>
35+
</docs-step>
3636

3737
<docs-step title="Confirm the code still works">
3838
1. Save your changes and confirm the app does not have any errors.

adev/src/content/tutorials/first-app/steps/07-dynamic-template-values/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ In the code editor:
2727
1. Navigate to `src/app/housing-location/housing-location.ts`
2828
1. In the template property of the `@Component` decorator, replace the existing HTML markup with the following code:
2929

30-
<docs-code language="angular-ts" header="Update HousingLocation template in housing-location.ts" path="adev/src/content/tutorials/first-app/steps/08-ngFor/src/app/housing-location/housing-location.ts" visibleLines="[6,17]"/>
30+
<docs-code language="angular-ts" header="Update HousingLocation template in housing-location.ts" path="adev/src/content/tutorials/first-app/steps/08-ngFor/src/app/housing-location/housing-location.ts" visibleLines="[6,17]"/>
3131

3232
In this updated template code you have used property binding to bind the `housingLocation.photo` to the `src` attribute. The `alt` attribute uses interpolation to give more context to the alt text of the image.
3333

adev/src/content/tutorials/first-app/steps/09-services/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ In the **Terminal** pane of your IDE:
3535
1. In your project directory, navigate to the `first-app` directory.
3636
1. In the `first-app` directory, run this command to create the new service.
3737

38-
```shell
39-
ng generate service housing --skip-tests
40-
```
38+
```shell
39+
ng generate service housing --skip-tests
40+
```
4141

4242
1. Run `ng serve` to build the app and serve it to `http://localhost:4200`.
4343
1. Confirm that the app builds without error.
@@ -63,7 +63,7 @@ In the **Edit** pane of your IDE:
6363

6464
1. Add a file level import for the `HousingLocation`.
6565

66-
<docs-code header="Import HousingLocation type in src/app/housing.service.ts" path="adev/src/content/tutorials/first-app/steps/10-routing/src/app/housing.service.ts" visibleLines="[2]"/>
66+
<docs-code header="Import HousingLocation type in src/app/housing.service.ts" path="adev/src/content/tutorials/first-app/steps/10-routing/src/app/housing.service.ts" visibleLines="[2]"/>
6767

6868
1. Confirm that the app builds without error.
6969
Correct any errors before you continue to the next step.
@@ -75,23 +75,23 @@ In a later lesson, you'll replace the static data with a live data source to get
7575

7676
In the **Edit** pane of your IDE, in `src/app/home/home.ts`:
7777

78-
1. At the top of `src/app/home/home.ts`, add the `inject` to the items imported from `@angular/core`. This will import the `inject` function into the `Home` class.
78+
1. At the top of `src/app/home/home.ts`, add the `inject` to the items imported from `@angular/core`. This will import the `inject` function into the `Home` class.
7979

80-
<docs-code language="angular-ts" header="Update to src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/10-routing/src/app/home/home.ts" visibleLines="[1]"/>
80+
<docs-code language="angular-ts" header="Update to src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/10-routing/src/app/home/home.ts" visibleLines="[1]"/>
8181

82-
1. Add a new file level import for the `HousingService`:
82+
1. Add a new file level import for the `HousingService`:
8383

84-
<docs-code language="angular-ts" header="Add import to src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/10-routing/src/app/home/home.ts" visibleLines="[4]"/>
84+
<docs-code language="angular-ts" header="Add import to src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/10-routing/src/app/home/home.ts" visibleLines="[4]"/>
8585

86-
1. From `Home`, 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`.
86+
1. From `Home`, 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`.
8787

88-
1. In `Home`, 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`.
88+
1. In `Home`, 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`.
8989

90-
<docs-code language="angular-ts" header="Initialize data from service in src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/10-routing/src/app/home/home.ts" visibleLines="[23,30]"/>
90+
<docs-code language="angular-ts" header="Initialize data from service in src/app/home/home.ts" path="adev/src/content/tutorials/first-app/steps/10-routing/src/app/home/home.ts" visibleLines="[23,30]"/>
9191

92-
1. Save the changes to `src/app/home/home.ts` and confirm your app builds without error.
93-
Correct any errors before you continue to the next step.
94-
</docs-step>
92+
1. Save the changes to `src/app/home/home.ts` and confirm your app builds without error.
93+
Correct any errors before you continue to the next step.
94+
</docs-step>
9595

9696
</docs-workflow>
9797

0 commit comments

Comments
 (0)