Use Razor component in HostedInAspNet.Client

This commit is contained in:
Steve Sanderson 2018-02-13 19:58:39 +00:00
parent af98672b17
commit b834f3b35b
2 changed files with 2 additions and 17 deletions

View File

@ -0,0 +1 @@
<h1>Hello, world!</h1>

View File

@ -1,10 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Blazor.Browser;
using Microsoft.AspNetCore.Blazor.Browser.Rendering;
using Microsoft.AspNetCore.Blazor.Components;
using Microsoft.AspNetCore.Blazor.RenderTree;
namespace HostedInAspNet.Client
{
@ -12,20 +9,7 @@ namespace HostedInAspNet.Client
{
static void Main(string[] args)
{
// Temporarily render this test component until there's a proper mechanism
// for testing this.
new BrowserRenderer().AddComponent<MyComponent>("app");
}
}
internal class MyComponent : IComponent
{
public void Init(RenderHandle renderHandle)
{
}
public void SetParameters(ParameterCollection parameters)
{
new BrowserRenderer().AddComponent<Home>("app");
}
}
}