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>
|
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">RazorComponentsWeb_CSharp.App</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- TODO: Remove this once it's included in the shared framework -->
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.Browser" Version="${MicrosoftAspNetCoreComponentsPackageVersion}" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.Browser" Version="${MicrosoftAspNetCoreComponentsPackageVersion}" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.Build" Version="${MicrosoftAspNetCoreComponentsPackageVersion}" PrivateAssets="all" />
|
<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
|
The Router component displays whichever component has a @page
|
||||||
into Program.cs, and it won't be necessary to specify AppAssembly.
|
directive matching the current URI.
|
||||||
-->
|
*@
|
||||||
<Router AppAssembly=typeof(Startup).Assembly />
|
<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
|
@inject WeatherForecastService ForecastService
|
||||||
|
|
||||||
<h1>Weather forecast</h1>
|
<h1>Weather forecast</h1>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="top-row px-4">
|
<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>
|
||||||
|
|
||||||
<div class="content px-4">
|
<div class="content px-4">
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,7 @@ namespace RazorComponentsWeb_CSharp.App
|
||||||
{
|
{
|
||||||
public void ConfigureServices(IServiceCollection services)
|
public void ConfigureServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
// Since Blazor is running on the server, we can use an application service
|
// Example of a data service
|
||||||
// to read the forecast data.
|
|
||||||
services.AddSingleton<WeatherForecastService>();
|
services.AddSingleton<WeatherForecastService>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue