Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

Tag Helpers: Ignore '@' symbols in Tag Helper attributes if not string or character. #129

@NTaylorMullen

Description

@NTaylorMullen

The typical flow for a Razor developer is to write @Foo when they want to switch from HTML to C# code. Now that we're dealing with HTML attributes that could potentially be projected into a C# context we need to consider the impact.

Do we ignore @ symbols in C# projected HTML attributes?

AKA:

public class CurrentAgeTagHelper : TagHelper
{
    public int Age { get; set; }
    ...
}
@{
    myAge = "3";
}

<currentAge age="@myAge" />
<currentAge age="myAge" /> @* This has equivalent output to the line above *@
<currentAge age="3" /> @* This has equivalent output to the line above *@

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions