maliming
2 years ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
8 additions and
2 deletions
-
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/App.razor
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
@using Volo.Abp.AspNetCore.Components.Server.BasicTheme.Bundling |
|
|
|
@using Volo.Abp.AspNetCore.Mvc.UI.Bundling |
|
|
|
@using Microsoft.AspNetCore.Http |
|
|
|
@inject IBundleManager BundleManager |
|
|
|
<!DOCTYPE html> |
|
|
|
<html lang="en"> |
|
|
|
@ -19,12 +20,12 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
<HeadOutlet /> |
|
|
|
<HeadOutlet @rendermode="RenderModeForPage" /> |
|
|
|
|
|
|
|
</head> |
|
|
|
<body> |
|
|
|
|
|
|
|
<Routes /> |
|
|
|
<Routes @rendermode="RenderModeForPage" /> |
|
|
|
|
|
|
|
<script src="_framework/blazor.web.js"></script> |
|
|
|
|
|
|
|
@ -45,6 +46,11 @@ |
|
|
|
private IReadOnlyList<BundleFile>? StyleBundleFiles { get; set; } |
|
|
|
private IReadOnlyList<BundleFile>? ScriptBundleFiles { get; set; } |
|
|
|
|
|
|
|
[CascadingParameter] |
|
|
|
private HttpContext HttpContext { get; set; } = default!; |
|
|
|
|
|
|
|
private IComponentRenderMode? RenderModeForPage => HttpContext.Request.Path.StartsWithSegments("/Identity") ? InteractiveAuto : null; |
|
|
|
|
|
|
|
protected override async Task OnInitializedAsync() |
|
|
|
{ |
|
|
|
StyleBundleFiles = await BundleManager.GetStyleBundleFilesAsync(BlazorBasicThemeBundles.Styles.Global); |
|
|
|
|