This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Tag Helpers: add support for @
in a tag helper attribute value
#1253
Comments
This was referenced Oct 6, 2014
See: ProcessAsync_CallsGeneratorWithExpectedValues_ItemsAndMultiple for a test that needs to be updated when this is fixed. |
dougbu
added a commit
to aspnet/Razor
that referenced
this issue
Jan 12, 2015
- #129 and aspnet/Mvc#1253 - add new `CSharpTagHelperAttributeValueVisitor` that writes the raw expression - update existing tests to include new line pragmas and updated line mappings - add tests of embedded `@(...)` and mix that with normal expressions nits: - cleanup long lines in `CSharpTagHelperCodeRenderer` - ease debugging of `LineMapping` values - improve assertion failures about code mapping miss-matches - add `GENERATE_BASELINES` reminder to test project.json
dougbu
added a commit
to aspnet/Razor
that referenced
this issue
Jan 15, 2015
- #129 and support aspnet/Mvc#1253 - add new `CSharpTagHelperAttributeValueVisitor` that writes the raw expression - add tests of embedded `@(...)` and mix that with normal expressions - add new resources for errors in `CSharpTagHelperAttributeValueVisitor` - update baselines to match new code generation nits: - cleanup long lines in `CSharpTagHelperCodeRenderer` - remove a few unused resources CR comments: Do not `throw` in `CSharpTagHelperAttributeValueVisitor` - use `ParserErrorSink` instead - add error if bound non-`string` attribute value is empty (don't handle) - move `#line` pragma to surround entire bound attribute value assignment - need non-`null` `ChunkBlock.Association` value for this to work - clean up some whitespace special-cases needed for previous approach
dougbu
added a commit
that referenced
this issue
Jan 15, 2015
- address #1253 using new Razor capabilities - update baselines to match latest code generation - use new `CodeBuilderContext` and `TagHelperAttributeValueCodeRenderer` signatures - test complex expressions in bound non-string attribute values
dougbu
changed the title
Tag Helpers: support user typing entire RHS of a
Tag Helpers: add support for Jan 15, 2015
ModelExpression
lambda expression@
in a tag helper attribute value
previous title was "support user typing entire RHS of a example attribute values to support: <select
asp-for="@(Model.YearsEmployeed)"
asp-items="@((IEnumerable<SelectListItem>)ViewBag.Items)">
...
</select>
<cache vary-by-user="@DateTimeOffset.Now > @(DateTimeOffset.Parse("1 April 2015"))">
...
</cache> |
dougbu
added a commit
that referenced
this issue
Jan 15, 2015
- part II of #1253 - an expected case in template .cshtml files - expression has name `""`; led to `ArgumentException` in `ModelExpression` - test `@Model` and `@model.Property` in unit and functional tests - update baselines to match nit: remove a few unecessary `@`s in .cshtml files
dougbu
added a commit
that referenced
this issue
Jan 15, 2015
- address part I of #1253 using new Razor capabilities - update baselines to match latest code generation - use new `CodeBuilderContext` and `TagHelperAttributeValueCodeRenderer` signatures - test complex expressions in bound non-string attribute values
dougbu
added a commit
that referenced
this issue
Jan 15, 2015
- part II of #1253 - an expected case in template .cshtml files - expression has name `""`; led to `ArgumentException` in `ModelExpression` - test `@Model` and `@model.Property` in unit and functional tests - update baselines to match nits: - remove a few unecessary `@`s in .cshtml files - correct field names & ids in ProductList.cshtml (`foreach` confuses MVC) - led to correct valiation attributes as well
dougbu
added a commit
to aspnet/Razor
that referenced
this issue
Jan 16, 2015
- #129 and support aspnet/Mvc#1253 - add new `CSharpTagHelperAttributeValueVisitor` that writes the raw expression - add tests of embedded `@(...)` and mix that with normal expressions - add new resources for errors in `CSharpTagHelperAttributeValueVisitor` - write errors using `ParserErrorSink` - update baselines to match new code generation nits: - cleanup long lines in `CSharpTagHelperCodeRenderer` - remove a few unused resources
dougbu
added a commit
that referenced
this issue
Jan 16, 2015
- part I of #1253 using new Razor capabilities - update baselines to match latest code generation - use new `CodeBuilderContext` and `TagHelperAttributeValueCodeRenderer` signatures - test complex expressions in bound non-string attribute values
dougbu
added a commit
that referenced
this issue
Jan 16, 2015
- part II of #1253 - an expected case in template .cshtml files - expression has name `""`; led to `ArgumentException` in `ModelExpression` - test `@Model` and `@model.Property` in unit and functional tests - update baselines to match nits: - remove a few unecessary `@`s in .cshtml files - correct field names & ids in ProductList.cshtml (`foreach` confuses MVC) - led to correct valiation attributes as well
dougbu
added a commit
that referenced
this issue
Jan 16, 2015
- part I of #1253 using new Razor capabilities - update baselines to match latest code generation - use new `CodeBuilderContext` and `TagHelperAttributeValueCodeRenderer` signatures - test complex expressions in bound non-string attribute values
dougbu
added a commit
that referenced
this issue
Jan 16, 2015
- part II of #1253 - an expected case in template .cshtml files - expression has name `""`; led to `ArgumentException` in `ModelExpression` - test `@Model` and `@model.Property` in unit and functional tests - update baselines to match nits: - remove a few unecessary `@`s in .cshtml files - correct field names & ids in ProductList.cshtml (`foreach` confuses MVC) - led to correct valiation attributes as well
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
specifically, add support for a leading
@
in an expression the user types. this enables use of expressions that are not model properties e.g.The text was updated successfully, but these errors were encountered: