Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C# expressions in attributes with hyphens don't compile #16429

Closed
SteveSandersonMS opened this issue Mar 8, 2018 · 6 comments
Closed

C# expressions in attributes with hyphens don't compile #16429

SteveSandersonMS opened this issue Mar 8, 2018 · 6 comments
Assignees
Labels
area-blazor Includes: Blazor, Razor Components

Comments

@SteveSandersonMS
Copy link
Member

In a cshtml file, try <div data-something="@someValue"></div>

@rynowak
Copy link
Member

rynowak commented Mar 9, 2018

I imagine this is a bug in the node writer logic. If you think we're close to removing support for the temporary <c:Foo> syntax, I'd prefer to do that first.

I have a PR out for https://github.com/aspnet/Blazor/issues/214 now.

@rynowak
Copy link
Member

rynowak commented Mar 9, 2018

I can confirm that this does reproduce easily though

@rynowak rynowak self-assigned this Mar 9, 2018
@SteveSandersonMS
Copy link
Member Author

@rynowak I know this is assigned to you, and maybe you're addressing it as part of the bind work, but would it be OK if I put in a fix for this? It would help with some sample stuff I'm doing.

@rynowak
Copy link
Member

rynowak commented Mar 16, 2018

Go ahead, I don't think I can get to this before monday

@davidnmbond
Copy link

Has this one been closed because there is a temporary workaround? If so, it should be re-opened.

This still doesn't compile:

<span class="input-group-text" data-container="body" data-toggle="popover" data-placement="left" data-content="@HelpText">?</span>

@rynowak
Copy link
Member

rynowak commented May 9, 2018

Hi @davidnmbond - we know of an issue specifically with data- attributes that we're tracking at https://github.com/aspnet/Blazor/issues/297

You can work around that for now by using data_.

If that doesn't resolve your problem please open a new issue and provide details so we can investigate.

@mkArtakMSFT mkArtakMSFT transferred this issue from dotnet/blazor Oct 27, 2019
@mkArtakMSFT mkArtakMSFT added the area-blazor Includes: Blazor, Razor Components label Oct 27, 2019
@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

4 participants