<summary> / <details> Tag not working
Trying to use summary / details Tags produced the following error message: (in Firefox / Chrome)
Error: System.InvalidOperationException: Object of type 'ShowRaum.Client.Pages.Summary' does not have a property matching the name 'ChildContent'.
I know, it is not (yet) supported in Edge.
To reproduce:
Just add
<details>
<summary>Some text</summary>
<p>Another text</p>
</details>
to Counter.cshtml.
regards
Uwe
This is because you've defined a component called Summary, so it's trying to use that instead of a plain <summary> tag. You'll have to avoid naming components things that clash with HTML elements.
Eventually we should change the Razor compiler so it only matches components case-sensitively, as that eliminates this issue and is consistent with both HTML (idiomatically lowercase) and .NET (idiomatically uppercase) naming conventions. That's also the same as how React avoids this issue.
@rynowak Do you happen to know how much of a big job it would be to make the component tag helper matching be case-sensitive? I know that's not how Razor usually defines tag-helper matching.
Thanks for your incredibly fast answer and sorry for wasting your time. Checked everything except component name ...
regards