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
…
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
…
AsyncEventHandlerComponent.cshtml
…
BasicTestApp.csproj
…
BindCasesComponent.cshtml
…
ComponentRefComponent.cshtml
…
CounterComponent.cshtml
…
CounterComponentUsingChild.cshtml
…
CounterComponentWrapper.cshtml
…
DataDashComponent.cshtml
…
ElementRefComponent.cshtml
…
EventBubblingComponent.cshtml
…
EventPreventDefaultComponent.cshtml preventDefault for form onsubmit handlers. Fixes #951 2018-07-24 08:11:02 -07:00
ExternalContentPackage.cshtml
…
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
…
LogicalElementInsertionCases.cshtml
…
MarkupBlockComponent.cshtml Add HTML Block rewriting (#1146) 2018-07-23 18:18:07 +01:00
MessageComponent.cshtml
…
MouseEventComponent.cshtml
…
OrderedList.cshtml Add support for Razor templates 2018-08-31 19:10:42 -07:00
ParentChildComponent.cshtml
…
PassThroughContentComponent.cshtml
…
Program.cs
…
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
…
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
…