aspnetcore/test/testapps/BasicTestApp
Ryan Nowak 6f383a0f0f Adds support for 'Context' parameters on components (#1470)
Adds support for 'Context' parameters on components

This change allows you to set the parameter name of a parameterized child content by using the `Context` attribute on the component. The `Context` attribute will be defined (and shown by completion) when the component has one or more declared parameterized (`RenderFragment<>`) child content parameters.

This is nice for cases where you are using implicit child content:

```
<ol>
  <Repeater Items="People" Context="person">
    <li>@person.FirstName</li>
  </Repeater>
</ol>
```

 or, when you have multiple child content elements and want them all to have the same parameter name:

 ```
<MyComponent Items="People" Context="person">
    <ChildContent1><div>@person.FirstName</div></ChildContent1>
    <ChildContent2><div>@person.LastName</div></ChildContent2>
</Repeater>
```

The parameter name can be overridden by using the `Context` parameter on the child content element:

 ```
<MyComponent Items="People" Context="person">
    <ChildContent1 Context="item"><div>@item.FirstName</div></ChildContent1>
    <ChildContent2><div>@person.LastName</div></ChildContent2>
</Repeater>
```

If the component defines a `Context` parameter already then we won't synthesize one - your component's parameter will work exactly as it did before this feature.
2018-09-24 12:22:16 -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 Fix negative route params. Fixes #1437 2018-09-24 17:55:21 +01:00
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 Templated Components (#1404) 2018-09-10 18:59:51 -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
MultipleChildContent.cshtml Adds support for 'Context' parameters on components (#1470) 2018-09-24 12:22:16 -07:00
OrderedList.cshtml Add support for generic-typed components (#1417) 2018-09-16 14:01:15 -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 Type Inference for Generic-Typed Components 2018-09-20 12:19:26 -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
TemplatedTable.cshtml Add support for generic-typed components (#1417) 2018-09-16 14:01:15 -07:00
TextOnlyComponent.cshtml
TouchEventComponent.cshtml JavaScript interop v3 (#1033) 2018-06-25 15:14:42 +01:00