Skip to content

Commit 39c3ca2

Browse files
authored
Updated the template per #12245 (#12325)
1 parent 7b65a32 commit 39c3ca2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Pages/_Host.cshtml

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
<link href="css/site.css" rel="stylesheet" />
1414
</head>
1515
<body>
16-
<app>@(await Html.RenderComponentAsync<App>())</app>
16+
<app>
17+
@* Remove the following line of code to disable prerendering *@
18+
@(await Html.RenderStaticComponentAsync<App>())
19+
</app>
1720

1821
<script src="_framework/blazor.server.js"></script>
1922
</body>

src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Startup.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
169169
#if (OrganizationalAuth || IndividualAuth)
170170
endpoints.MapControllers();
171171
#endif
172-
endpoints.MapBlazorHub();
172+
endpoints.MapBlazorHub<App>(selector: "app");
173173
endpoints.MapFallbackToPage("/_Host");
174174
});
175175
}

0 commit comments

Comments
 (0)