Skip to content

Commit

Permalink
Upgraded to preview 9
Browse files Browse the repository at this point in the history
  • Loading branch information
dodyg committed Sep 6, 2019
1 parent 6dfbf6a commit c7ec1b1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
16 changes: 9 additions & 7 deletions projects/blazor-ss/HelloWorld/Components/App.razor
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<CascadingAuthenticationState>
<Router AppAssembly="typeof(Startup).Assembly">
<NotFoundContent>
<p>Sorry, there's nothing at this address.</p>
</NotFoundContent>
</Router>
</CascadingAuthenticationState>
<Router AppAssembly="typeof(Program).Assembly">
<Found Context="routeData">
<RouteView RouteData="routeData" />
</Found>
<NotFound>
<h1>Page not found</h1>
<p>Sorry, but there's nothing here!</p>
</NotFound>
</Router>
4 changes: 3 additions & 1 deletion projects/blazor-ss/HelloWorld/Components/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
@using Microsoft.AspNetCore.Components.Forms

@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.JSInterop
@using Microsoft.JSInterop
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Authorization
2 changes: 1 addition & 1 deletion projects/blazor-ss/HelloWorld/Pages/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<link href="css/site.css" rel="stylesheet" />
</head>
<body>
<app></app>
<app>@(await Html.RenderComponentAsync<App>(RenderMode.ServerPrerendered))</app>

<script src="_framework/blazor.server.js"></script>
</body>
Expand Down
3 changes: 1 addition & 2 deletions projects/blazor-ss/HelloWorld/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public void Configure(IApplicationBuilder app, IHostEnvironment env)
}
else
{
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}

Expand All @@ -33,7 +32,7 @@ public void Configure(IApplicationBuilder app, IHostEnvironment env)
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapBlazorHub<App>("app");
endpoints.MapBlazorHub();
endpoints.MapRazorPages();
endpoints.MapFallbackToPage("/Index");
});
Expand Down
2 changes: 1 addition & 1 deletion projects/blazor-ss/global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "3.0.100-preview8-013656"
"version": "3.0.100-preview9-014004"
}
}

0 comments on commit c7ec1b1

Please sign in to comment.