aspnetcore/test/testapps/BasicTestApp
Ryan Nowak c97cb8c18b Add support for Razor templates
Adds support for Razor templates and RenderFragment<T>.

Razor templates are a little-known Razor feature that looks like:
```
@<tag>....<tag>
```

It's so little known that it's not even covered in our docs, but it's
been around for many many years. This features hasn't been implemented
until now for Blazor, and this feature brings it back as a build
building block for templated components (more to come).

In Blazor land a template like:
```
@{ RenderFragment<Person> template = @<div>@item.Name</div>; }
```

complies to code like:
```
RenderFragment<Person> template = (__builder, item) =>
{
    __builder.OpenElement(...);
    ...
    __builder.CloseElement(...);
}
```

Since the declaration always has a generic type parameter inside, it
needs to be in a context where the type is known.. ie: not with `var`.

See tests for ways to consume templates.

NOTE: There are the following caveats for templates
- Templates require a single root element.
- Templates don't work in the `@functions { }` block

These limitations are baked into the core of Razor and will take a while
for us to address (v3.0).
2018-08-31 19:10:42 -07:00
..
HierarchicalImportsTest
HttpClientTest
InteropTest Allow passing DotNetObjectRef to JS in interop calls, and invoking 2018-07-19 18:57:17 +01:00
Properties
RouterTest
wwwroot Fix returning arrays in async JS interop calls. Fixes #1205 2018-07-27 10:11:45 -07:00
AddRemoveChildComponents.cshtml
AfterRenderInteropComponent.cshtml JavaScript interop v3 (#1033) 2018-06-25 15:14:42 +01:00
AsyncEventHandlerComponent.cshtml
BasicTestApp.csproj
BindCasesComponent.cshtml
ComponentRefComponent.cshtml
CounterComponent.cshtml Run E2E tests for server execution as well as WebAssembly. Fixes several 2018-07-19 18:57:17 +01:00
CounterComponentUsingChild.cshtml
CounterComponentWrapper.cshtml
DataDashComponent.cshtml
ElementRefComponent.cshtml JavaScript interop v3 (#1033) 2018-06-25 15:14:42 +01:00
EventBubblingComponent.cshtml
EventPreventDefaultComponent.cshtml preventDefault for form onsubmit handlers. Fixes #951 2018-07-24 08:11:02 -07:00
ExternalContentPackage.cshtml JavaScript interop v3 (#1033) 2018-06-25 15:14:42 +01:00
FocusEventComponent.cshtml
HtmlBlockChildContent.cshtml Reenable markup blocks (#1286) 2018-08-10 16:29:39 -07:00
HtmlEncodedChildContent.cshtml Reenable markup blocks (#1286) 2018-08-10 16:29:39 -07:00
HtmlMixedChildContent.cshtml Reenable markup blocks (#1286) 2018-08-10 16:29:39 -07:00
Index.cshtml Add support for Razor templates 2018-08-31 19:10:42 -07:00
InteropComponent.cshtml Fix returning arrays in async JS interop calls. Fixes #1205 2018-07-27 10:11:45 -07:00
KeyPressEventComponent.cshtml JavaScript interop v3 (#1033) 2018-06-25 15:14:42 +01:00
LogicalElementInsertionCases.cshtml
MarkupBlockComponent.cshtml Add HTML Block rewriting (#1146) 2018-07-23 18:18:07 +01:00
MessageComponent.cshtml
MouseEventComponent.cshtml JavaScript interop v3 (#1033) 2018-06-25 15:14:42 +01:00
OrderedList.cshtml Add support for Razor templates 2018-08-31 19:10:42 -07:00
ParentChildComponent.cshtml
PassThroughContentComponent.cshtml
Program.cs Run E2E tests for server execution as well as WebAssembly. Fixes several 2018-07-19 18:57:17 +01:00
PropertiesChangedHandlerChild.cshtml
PropertiesChangedHandlerParent.cshtml
RazorTemplates.cshtml Add support for Razor templates 2018-08-31 19:10:42 -07:00
RedTextComponent.cshtml
RenderFragmentToggler.cshtml
Startup.cs Run E2E tests for server execution as well as WebAssembly. Fixes several 2018-07-19 18:57:17 +01:00
SvgCircleComponent.cshtml
SvgComponent.cshtml Fix updating attributes on SVG elements. Fixes #934 and #1114 2018-07-23 16:03:18 -07:00
SvgWithChildComponent.cshtml
TextOnlyComponent.cshtml
TouchEventComponent.cshtml JavaScript interop v3 (#1033) 2018-06-25 15:14:42 +01:00