diff --git a/samples/HostedInAspNet.Client/HostedInAspNet.Client.csproj b/samples/HostedInAspNet.Client/HostedInAspNet.Client.csproj index 12774549e6..8436207e11 100644 --- a/samples/HostedInAspNet.Client/HostedInAspNet.Client.csproj +++ b/samples/HostedInAspNet.Client/HostedInAspNet.Client.csproj @@ -13,6 +13,7 @@ + diff --git a/samples/HostedInAspNet.Client/Program.cs b/samples/HostedInAspNet.Client/Program.cs index 1e22fe34cf..c972eccd7f 100644 --- a/samples/HostedInAspNet.Client/Program.cs +++ b/samples/HostedInAspNet.Client/Program.cs @@ -2,6 +2,8 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.Blazor.Browser; +using Microsoft.Blazor.Components; +using Microsoft.Blazor.UITree; namespace HostedInAspNet.Client { @@ -9,7 +11,31 @@ namespace HostedInAspNet.Client { static void Main(string[] args) { - new Renderer(); + // Temporarily render this test component until there's a proper mechanism + // for testing this. + Renderer.Render(new MyComponent(), "app"); + } + } + + internal class MyComponent : IComponent + { + public void Render(UITreeBuilder builder) + { + builder.OpenElement("h1"); + builder.AddText("Hello from UITree"); + builder.CloseElement(); + + builder.OpenElement("ul"); + + builder.OpenElement("li"); + builder.AddText("First item"); + builder.CloseElement(); + + builder.OpenElement("li"); + builder.AddText("Second item"); + builder.CloseElement(); + + builder.CloseElement(); } } } diff --git a/samples/HostedInAspNet.Client/wwwroot/index.html b/samples/HostedInAspNet.Client/wwwroot/index.html index 943ee7c116..6fb354ac44 100644 --- a/samples/HostedInAspNet.Client/wwwroot/index.html +++ b/samples/HostedInAspNet.Client/wwwroot/index.html @@ -5,6 +5,6 @@ Sample Blazor app -

Hello

+ Loading... diff --git a/src/Microsoft.Blazor.Browser.JS/src/Boot.ts b/src/Microsoft.Blazor.Browser.JS/src/Boot.ts index dc04668436..4b11f6c205 100644 --- a/src/Microsoft.Blazor.Browser.JS/src/Boot.ts +++ b/src/Microsoft.Blazor.Browser.JS/src/Boot.ts @@ -1,5 +1,6 @@ import { platform } from './Environment'; import { getAssemblyNameFromUrl } from './Platform/DotNet'; +import './Rendering/Renderer'; async function boot() { // Read startup config from the