This repository was archived by the owner on May 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +38
-38
lines changed Expand file tree Collapse file tree 5 files changed +38
-38
lines changed Original file line number Diff line number Diff line change 1- <Router AppAssembly =" typeof(Program).Assembly" >
2- <Found Context =" routeData" >
3- <RouteView RouteData =" routeData" DefaultLayout =" typeof(MainLayout)" />
4- </Found >
5- <NotFound >
6- <h1 >Page not found</h1 >
7- <p >Sorry, but there's nothing here!</p >
8- </NotFound >
9- </Router >
1+ @inject IHostEnvironment Env
2+
3+ <!DOCTYPE html>
4+ <html lang =" en" >
5+ <head >
6+ <meta charset =" utf-8" />
7+ <meta name =" viewport" content =" width=device-width, initial-scale=1.0" />
8+ <title >Catalog manager (Blazor)</title >
9+ <base href =" /" />
10+ <link rel =" stylesheet" href =" css/bootstrap/bootstrap.min.css" />
11+ <link href =" css/base.css" rel =" stylesheet" />
12+ <link href =" css/custom.css" rel =" stylesheet" />
13+ <link href =" css/site.css" rel =" stylesheet" />
14+ </head >
15+ <HeadOutlet @rendermode =" InteractiveServer" />
16+ <body >
17+ @* <app>@(await Html.RenderComponentAsync<HeadOutlet>(RenderMode.ServerPrerendered))</app> *@
18+ <Routes @rendermode =" InteractiveServer" />
19+
20+ <script src =" _framework/blazor.web.js" ></script >
21+ </body >
22+ </html >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- using eShopOnBlazor . Models ;
1+ using eShopOnBlazor . Models ;
22using eShopOnBlazor . Models . Infrastructure ;
33using eShopOnBlazor . Services ;
44using log4net ;
1010// add services
1111
1212builder . Services . AddRazorPages ( ) ;
13- builder . Services . AddServerSideBlazor ( ) ;
13+ builder . Services . AddRazorComponents ( ) . AddInteractiveServerComponents ( ) ;
1414
1515if ( builder . Configuration . GetValue < bool > ( "UseMockData" ) )
1616{
4949
5050app . UseRouting ( ) ;
5151
52- app . UseEndpoints ( endpoints =>
53- {
54- endpoints . MapBlazorHub ( ) ;
55- endpoints . MapFallbackToPage ( "/_Host" ) ;
56- } ) ;
52+ app . UseAntiforgery ( ) ;
53+
54+ app . MapRazorComponents < App > ( )
55+ . AddInteractiveServerRenderMode ( ) ;
5756
5857ConfigDataBase ( app ) ;
5958
Original file line number Diff line number Diff line change 1+ <Router AppAssembly =" typeof(Program).Assembly" >
2+ <Found Context =" routeData" >
3+ <RouteView RouteData =" routeData" DefaultLayout =" typeof(MainLayout)" />
4+ </Found >
5+ <NotFound >
6+ <h1 >Page not found</h1 >
7+ <p >Sorry, but there's nothing here!</p >
8+ </NotFound >
9+ </Router >
Original file line number Diff line number Diff line change 99@using eShopOnBlazor .Services
1010@using eShopOnBlazor .Shared
1111@using eShopOnBlazor .ViewModel
12+ @using static Microsoft .AspNetCore .Components .Web .RenderMode
You can’t perform that action at this time.
0 commit comments