You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: adev/src/content/tutorials/first-app/steps/02-Home/README.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -70,11 +70,11 @@ In the **Edit** pane of your IDE:
70
70
71
71
1. In `app.ts`, in `@Component`, update the `imports` array property and add `Home`.
72
72
73
-
<docs-codeheader="Replace in src/app/app.ts"path="adev/src/content/tutorials/first-app/steps/03-HousingLocation/src/app/app.ts"visibleLines="[7]"/>
73
+
<docs-codeheader="Replace in src/app/app.ts"path="adev/src/content/tutorials/first-app/steps/03-HousingLocation/src/app/app.ts"visibleLines="[6]"/>
74
74
75
75
1. In `app.ts`, in `@Component`, update the `template` property to include the following HTML code.
76
76
77
-
<docs-codeheader="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-codeheader="Replace in src/app/app.ts"path="adev/src/content/tutorials/first-app/steps/03-HousingLocation/src/app/app.ts"visibleLines="[7,16]"/>
78
78
79
79
1. Save your changes to `app.ts`.
80
80
1. If `ng serve` is running, the app should update.
@@ -100,7 +100,7 @@ In the **Edit** pane of your IDE:
100
100
1. In the `first-app` directory, open `home.ts` in the editor.
101
101
1. In `home.ts`, in `@Component`, update the `template` property with this code.
102
102
103
-
<docs-codeheader="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-codeheader="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]"/>
104
104
105
105
1. Next, open `home.css` in the editor and update the content with these styles.
Copy file name to clipboardExpand all lines: adev/src/content/tutorials/first-app/steps/03-HousingLocation/README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -51,11 +51,11 @@ In the **Edit** pane of your IDE:
51
51
52
52
1. Next update the `imports` property of the `@Component` metadata by adding `HousingLocation` to the array.
53
53
54
-
<docs-codeheader="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-codeheader="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]"/>
55
55
56
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.
57
57
58
-
<docs-codeheader="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-codeheader="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]"/>
Copy file name to clipboardExpand all lines: adev/src/content/tutorials/first-app/steps/04-interfaces/README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -70,9 +70,9 @@ There are a few more lessons to complete before that happens.
70
70
71
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.
72
72
73
-
<docs-codeheader="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-codeheader="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]"/>
74
74
75
-
1. Confirm that your `home.ts` file matches like this example.
75
+
1. Confirm that your `home.ts` file matches this example.
Copy file name to clipboardExpand all lines: adev/src/content/tutorials/first-app/steps/11-details-page/README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ In this step, you will get the route parameter in the `Details`. Currently, the
72
72
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.
73
73
</docs-step>
74
74
75
-
<docs-steptitle="Customize the `Detail`">
75
+
<docs-steptitle="Customize the `Details`">
76
76
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.
77
77
78
78
To access the data you will add a call to the `HousingService`.
Copy file name to clipboardExpand all lines: adev/src/content/tutorials/first-app/steps/12-forms/README.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ In the **Edit** pane of your IDE:
25
25
26
26
1. In `src/app/housing.service.ts`, inside the `HousingService` class, paste this method at the bottom of the class definition.
27
27
28
-
<docs-codeheader="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-codeheader="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]"/>
29
29
30
30
1. Confirm that the app builds without error.
31
31
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`:
38
38
39
39
1. After the `import` statements at the top of the file, add the following code to import the Angular form classes.
40
40
41
-
<docs-codeheader="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-codeheader="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]"/>
42
42
43
43
1. In the `Details` decorator metadata, update the `imports` property with the following code:
44
44
45
-
<docs-codeheader="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-codeheader="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]"/>
46
46
47
47
1. In the `Details` class, before the `constructor()` method, add the following code to create the form object.
48
48
49
-
<docs-codeheader="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-codeheader="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]"/>
50
50
51
51
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.
52
52
53
53
1. In the `Details` class, after the `constructor()` method, add the following code to handle the **Apply now** click.
54
54
55
-
<docs-codeheader="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-codeheader="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]"/>
56
56
57
57
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`.
Copy file name to clipboardExpand all lines: adev/src/content/tutorials/first-app/steps/13-search/README.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -20,13 +20,13 @@ In this step, you'll update the `Home` class to store data in a new array proper
20
20
21
21
1. In `src/app/home/home.ts`, add new property to the class called `filteredLocationList`.
22
22
23
-
<docs-codeheader="Add the filtered results property"path="adev/src/content/tutorials/first-app/steps/14-http/src/app/home/home.ts"visibleLines="[30]"/>
23
+
<docs-codeheader="Add the filtered results property"path="adev/src/content/tutorials/first-app/steps/14-http/src/app/home/home.ts"visibleLines="[29]"/>
24
24
25
25
The `filteredLocationList` hold the values that match the search criteria entered by the user.
26
26
27
27
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.
28
28
29
-
<docs-codeheader="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-codeheader="Set the value of filteredLocationList"path="adev/src/content/tutorials/first-app/steps/14-http/src/app/home/home.ts"visibleLines="[30,33]"/>
30
30
31
31
</docs-step>
32
32
@@ -62,7 +62,7 @@ The template has been updated to bind the `filterResults` function to the `click
62
62
63
63
1. Update the `Home` class to include the implementation of the `filterResults` function.
64
64
65
-
<docs-codeheader="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-codeheader="Add the filterResults function implementation"path="adev/src/content/tutorials/first-app/steps/14-http/src/app/home/home.ts"visibleLines="[34,43]"/>
66
66
67
67
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.
0 commit comments