Cleanups for Razor Components template
This commit is contained in:
parent
694eaf793e
commit
0714466de4
|
|
@ -6,7 +6,6 @@
|
|||
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">RazorComponentsWeb_CSharp.App</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- TODO: Remove this once it's included in the shared framework -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Browser" Version="${MicrosoftAspNetCoreComponentsPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Build" Version="${MicrosoftAspNetCoreComponentsPackageVersion}" PrivateAssets="all" />
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!--
|
||||
Configuring this here is temporary. Later we'll move the app config
|
||||
into Program.cs, and it won't be necessary to specify AppAssembly.
|
||||
-->
|
||||
@*
|
||||
The Router component displays whichever component has a @page
|
||||
directive matching the current URI.
|
||||
*@
|
||||
<Router AppAssembly=typeof(Startup).Assembly />
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@using RazorComponentsWeb_CSharp.App.Services
|
||||
@page "/fetchdata"
|
||||
@page "/fetchdata"
|
||||
@using RazorComponentsWeb_CSharp.App.Services
|
||||
@inject WeatherForecastService ForecastService
|
||||
|
||||
<h1>Weather forecast</h1>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<div class="main">
|
||||
<div class="top-row px-4">
|
||||
<a href="https://blazor.net" target="_blank" class="ml-md-auto">About</a>
|
||||
<a href="https://docs.microsoft.com/en-us/aspnet/" target="_blank" class="ml-md-auto">About</a>
|
||||
</div>
|
||||
|
||||
<div class="content px-4">
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@ namespace RazorComponentsWeb_CSharp.App
|
|||
{
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
// Since Blazor is running on the server, we can use an application service
|
||||
// to read the forecast data.
|
||||
// Example of a data service
|
||||
services.AddSingleton<WeatherForecastService>();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue