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: docs/01-components-and-layout.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,8 @@ The solution already contains four projects:
15
15
16
16
-**BlazingPizza.Client**: This is the Blazor project. It contains the UI components for the app.
17
17
-**BlazingPizza.Server**: This is the ASP.NET Core project hosting the Blazor app and also the backend services for the app.
18
-
-**BlazingPizza.Shared**: Shared model types for the app.
19
-
-**BlazingPizza.ComponentsLibrary**: A library of components and helper code to be used by the app in later sessions.
18
+
-**BlazingPizza.Shared**: This project contains the shared model types for the app.
19
+
-**BlazingPizza.ComponentsLibrary**: This is a library of components and helper code to be used by the app in later sessions.
20
20
21
21
The **BlazingPizza.Server** project should be set as the startup project.
22
22
@@ -46,7 +46,7 @@ Add a `@code` block to *Index.razor* with a list field to keep track of the avai
46
46
}
47
47
```
48
48
49
-
The code in the `@code` block is added to the generated class for the component. The `PizzaSpecial` type is already defined for you in the Shared project.
49
+
The code in the `@code` block is added to the generated class for the component. The `PizzaSpecial` type is already defined for you in the **BlazingPizza.Shared** project.
50
50
51
51
To get the available list of specials we need to call an API on the backend. Blazor provides a preconfigured `HttpClient` through dependency injection that is already setup with the correct base address. Use the `@inject` directive to inject an `HttpClient` into the `Index` component.
52
52
@@ -70,7 +70,7 @@ Override the `OnInitializedAsync` method in the `@code` block to retrieve the li
70
70
}
71
71
```
72
72
73
-
The `/specials` API is defined by the `SpecialsController` in the Server project.
73
+
The `/specials` API is defined by the `SpecialsController` in the **BlazingPizza.Server** project.
74
74
75
75
Once the component is initialized it will render its markup. Replace the markup in the `Index` component with the following to list the pizza specials:
0 commit comments