Skip to content

Commit 6075430

Browse files
committed
Now the sample renders the layout but it does not render the page itself
1 parent 207b26b commit 6075430

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@using System.Net.Http
2+
@using Microsoft.AspNetCore.Components.Forms
3+
4+
@using Microsoft.AspNetCore.Components.Routing
5+
@using Microsoft.JSInterop
6+
@using Microsoft.AspNetCore.Components.Web
7+
@using Microsoft.AspNetCore.Components.Authorization
8+
9+
<Router AppAssembly="typeof(Program).Assembly">
10+
<Found Context="routeData">
11+
<RouteView RouteData="routeData" />
12+
</Found>
13+
<NotFound>
14+
<h1>Page not found</h1>
15+
<p>Sorry, but there's nothing here!</p>
16+
</NotFound>
17+
</Router>

projects/.net8/RazorComponentOne/Shared/MainLayout.razor

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-aFq/bzH65dt+w6FI2ooMVUpc+21e0SRygnTpmBvdBgSdnuTN7QbdgL+OapgHtvPp" crossorigin="anonymous">
1010
</head>
1111
<body>
12+
This text is from the layout but the body is missing
13+
<br/>
1214
@Body
1315
</body>
1416
</html>

0 commit comments

Comments
 (0)