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: aspnetcore/blazor/components/integration-hosted-webassembly.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,9 +145,9 @@ To set up prerendering for a hosted Blazor WebAssembly app:
145
145
146
146
1. Run the **:::no-loc text="Server":::** project. The hosted Blazor WebAssembly app is prerendered by the **:::no-loc text="Server":::** project for clients.
147
147
148
-
### Configuration for embedding Razor components into pages and views
148
+
### Configuration for embedding Razor components into pages or views
149
149
150
-
The following sections and examples for embedding Razor components from the **:::no-loc text="Client":::** Blazor WebAssembly app into pages and views of the server app require additional configuration.
150
+
The following sections and examples for embedding Razor components from the **:::no-loc text="Client":::** Blazor WebAssembly app into pages or views of the server app require additional configuration.
151
151
152
152
The **:::no-loc text="Server":::** project must have the following files and folders.
153
153
@@ -704,9 +704,9 @@ To set up prerendering for a hosted Blazor WebAssembly app:
704
704
705
705
1. Run the **:::no-loc text="Server":::** project. The hosted Blazor WebAssembly app is prerendered by the **:::no-loc text="Server":::** project for clients.
706
706
707
-
### Configuration for embedding Razor components into pages and views
707
+
### Configuration for embedding Razor components into pages or views
708
708
709
-
The following sections and examples for embedding Razor components from the **:::no-loc text="Client":::** Blazor WebAssembly app into pages and views of the server app require additional configuration.
709
+
The following sections and examples for embedding Razor components from the **:::no-loc text="Client":::** Blazor WebAssembly app into pages or views of the server app require additional configuration.
710
710
711
711
The **:::no-loc text="Server":::** project must have the following files and folders.
712
712
@@ -1145,9 +1145,9 @@ To set up prerendering for a hosted Blazor WebAssembly app:
1145
1145
1146
1146
1. Run the **:::no-loc text="Server":::** project. The hosted Blazor WebAssembly app is prerendered by the **:::no-loc text="Server":::** project for clients.
1147
1147
1148
-
### Configuration for embedding Razor components into pages and views
1148
+
### Configuration for embedding Razor components into pages or views
1149
1149
1150
-
The following sections and examples in this article for embedding Razor components of the client Blazor WebAssembly app into pages and views of the server app require additional configuration.
1150
+
The following sections and examples in this article for embedding Razor components of the client Blazor WebAssembly app into pages or views of the server app require additional configuration.
1151
1151
1152
1152
Use a default Razor Pages or MVC layout file in the **:::no-loc text="Server":::** project. The **:::no-loc text="Server":::** project must have the following files and folders.
1153
1153
@@ -1338,6 +1338,6 @@ Additional work might be required depending on the static resources that compone
1338
1338
1339
1339
:::moniker range="< aspnetcore-5.0"
1340
1340
1341
-
Integrating Razor components into Razor Pages and MVC apps in a hosted Blazor WebAssembly [solution](xref:blazor/tooling#visual-studio-solution-file-sln) is supported in ASP.NET Core in .NET 5 or later. Select a .NET 5 or later version of this article.
1341
+
Integrating Razor components into Razor Pages or MVC apps in a hosted Blazor WebAssembly [solution](xref:blazor/tooling#visual-studio-solution-file-sln) is supported in ASP.NET Core in .NET 5 or later. Select a .NET 5 or later version of this article.
Razor components can be integrated into Razor Pages and MVC apps. When the page or view is rendered, components can be prerendered at the same time.
15
+
Razor components can be integrated into Razor Pages or MVC apps. When the page or view is rendered, components can be prerendered at the same time.
16
16
17
17
> [!IMPORTANT]
18
18
> Framework changes across ASP.NET Core releases led to different sets of instructions in this article. Before using this article's guidance, confirm that the document version selector at the top of this article matches the version of ASP.NET Core that you intend to use for your app.
@@ -26,11 +26,11 @@ After [configuring the project](#configuration), use the guidance in the followi
26
26
* For components that are directly routable from user requests. Follow this guidance when visitors should be able to make an HTTP request in their browser for a component with an [`@page`](xref:mvc/views/razor#page) directive.
27
27
*[Use routable components in a Razor Pages app](#use-routable-components-in-a-razor-pages-app)
28
28
*[Use routable components in an MVC app](#use-routable-components-in-an-mvc-app)
29
-
* For components that aren't directly routable from user requests, see the [Render components from a page or view](#render-components-from-a-page-or-view) section. Follow this guidance when the app embeds components into existing pages and views with the [Component Tag Helper](xref:mvc/views/tag-helpers/builtin-th/component-tag-helper).
29
+
* For components that aren't directly routable from user requests, see the [Render components from a page or view](#render-components-from-a-page-or-view) section. Follow this guidance when the app embeds components into existing pages or views with the [Component Tag Helper](xref:mvc/views/tag-helpers/builtin-th/component-tag-helper).
30
30
31
31
## Configuration
32
32
33
-
Use the following guidance to integrate Razor components into pages and views of an existing Razor Pages or MVC app.
33
+
Use the following guidance to integrate Razor components into pages or views of an existing Razor Pages or MVC app.
34
34
35
35
1. Add an imports file to the root folder of the project with the following content. Change the `{APP NAMESPACE}` placeholder to the namespace of the project.
36
36
@@ -571,11 +571,11 @@ After [configuring the project](#configuration), use the guidance in the followi
571
571
* Routable components: For components that are directly routable from user requests. Follow this guidance when visitors should be able to make an HTTP request in their browser for a component with an [`@page`](xref:mvc/views/razor#page) directive.
572
572
*[Use routable components in a Razor Pages app](#use-routable-components-in-a-razor-pages-app)
573
573
*[Use routable components in an MVC app](#use-routable-components-in-an-mvc-app)
574
-
*[Render components from a page or view](#render-components-from-a-page-or-view): For components that aren't directly routable from user requests. Follow this guidance when the app embeds components into existing pages and views with the [Component Tag Helper](xref:mvc/views/tag-helpers/builtin-th/component-tag-helper).
574
+
*[Render components from a page or view](#render-components-from-a-page-or-view): For components that aren't directly routable from user requests. Follow this guidance when the app embeds components into existing pages or views with the [Component Tag Helper](xref:mvc/views/tag-helpers/builtin-th/component-tag-helper).
575
575
576
576
## Configuration
577
577
578
-
Use the following guidance to integrate Razor components into pages and views of an existing Razor Pages or MVC app.
578
+
Use the following guidance to integrate Razor components into pages or views of an existing Razor Pages or MVC app.
579
579
580
580
> [!IMPORTANT]
581
581
> The use of a layout page (`_Layout.cshtml`) with a [Component Tag Helper](xref:mvc/views/tag-helpers/builtin-th/component-tag-helper) for a <xref:Microsoft.AspNetCore.Components.Web.HeadOutlet> component is required to control `<head>` content, such as the page's title (<xref:Microsoft.AspNetCore.Components.Web.PageTitle> component) and other head elements (<xref:Microsoft.AspNetCore.Components.Web.HeadContent> component). For more information, see <xref:blazor/components/control-head-content#control-head-content-during-prerendering>.
@@ -1089,11 +1089,11 @@ After [configuring the project](#configuration), use the guidance in the followi
1089
1089
* Routable components: For components that are directly routable from user requests. Follow this guidance when visitors should be able to make an HTTP request in their browser for a component with an [`@page`](xref:mvc/views/razor#page) directive.
1090
1090
*[Use routable components in a Razor Pages app](#use-routable-components-in-a-razor-pages-app)
1091
1091
*[Use routable components in an MVC app](#use-routable-components-in-an-mvc-app)
1092
-
*[Render components from a page or view](#render-components-from-a-page-or-view): For components that aren't directly routable from user requests. Follow this guidance when the app embeds components into existing pages and views with the [Component Tag Helper](xref:mvc/views/tag-helpers/builtin-th/component-tag-helper).
1092
+
*[Render components from a page or view](#render-components-from-a-page-or-view): For components that aren't directly routable from user requests. Follow this guidance when the app embeds components into existing pages or views with the [Component Tag Helper](xref:mvc/views/tag-helpers/builtin-th/component-tag-helper).
1093
1093
1094
1094
## Configuration
1095
1095
1096
-
An existing Razor Pages or MVC app can integrate Razor components into pages and views:
1096
+
An existing Razor Pages or MVC app can integrate Razor components into pages or views:
1097
1097
1098
1098
1. In the project's layout file:
1099
1099
@@ -1514,7 +1514,7 @@ To resolve the problem, use ***either*** of the following approaches:
1514
1514
1515
1515
:::moniker range="< aspnetcore-5.0"
1516
1516
1517
-
Razor components can be integrated into Razor Pages and MVC apps. When the page or view is rendered, components can be prerendered at the same time.
1517
+
Razor components can be integrated into Razor Pages or MVC apps. When the page or view is rendered, components can be prerendered at the same time.
1518
1518
1519
1519
Prerendering can improve [Search Engine Optimization (SEO)](https://developer.mozilla.org/docs/Glossary/SEO) by rendering content for the initial HTTP response that search engines can use to calculate page rank.
1520
1520
@@ -1523,11 +1523,11 @@ After [configuring the project](#configuration), use the guidance in the followi
1523
1523
* Routable components: For components that are directly routable from user requests. Follow this guidance when visitors should be able to make an HTTP request in their browser for a component with an [`@page`](xref:mvc/views/razor#page) directive.
1524
1524
*[Use routable components in a Razor Pages app](#use-routable-components-in-a-razor-pages-app)
1525
1525
*[Use routable components in an MVC app](#use-routable-components-in-an-mvc-app)
1526
-
*[Render components from a page or view](#render-components-from-a-page-or-view): For components that aren't directly routable from user requests. Follow this guidance when the app embeds components into existing pages and views with the [Component Tag Helper](xref:mvc/views/tag-helpers/builtin-th/component-tag-helper).
1526
+
*[Render components from a page or view](#render-components-from-a-page-or-view): For components that aren't directly routable from user requests. Follow this guidance when the app embeds components into existing pages or views with the [Component Tag Helper](xref:mvc/views/tag-helpers/builtin-th/component-tag-helper).
1527
1527
1528
1528
## Configuration
1529
1529
1530
-
An existing Razor Pages or MVC app can integrate Razor components into pages and views:
1530
+
An existing Razor Pages or MVC app can integrate Razor components into pages or views:
0 commit comments