Skip to content

Commit 0ea48d9

Browse files
Fix loading comments page in sample
1 parent 7b700f9 commit 0ea48d9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: src/React.Sample.Webpack.CoreMvc/Startup.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,15 @@ public void Configure(IApplicationBuilder app)
5757

5858
app.UseEndpoints(endpoints =>
5959
{
60-
endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");
60+
endpoints.MapControllerRoute("default", "{path?}", new { controller = "Home", action = "Index" });
61+
endpoints.MapControllerRoute("comments-root", "comments", new { controller = "Home", action = "Index" });
62+
endpoints.MapControllerRoute("comments", "comments/page-{page}", new { controller = "Home", action = "Comments" });
6163
});
6264
#else
6365
app.UseMvc(routes =>
6466
{
6567
routes.MapRoute("default", "{path?}", new { controller = "Home", action = "Index" });
68+
routes.MapRoute("comments-root", "comments", new { controller = "Home", action = "Index" });
6669
routes.MapRoute("comments", "comments/page-{page}", new { controller = "Home", action = "Comments" });
6770
});
6871
#endif

0 commit comments

Comments
 (0)