The following syntax is not correct for indexer accessor:
var source = "{{#each names}}{{@root.names.[@index]}}{{/each}}";
var data = new
{
names = new[] { "Foo", "Bar" }
};
Expected result: "FooBar"
Actual result: ""
As well as for property accessor:
var source = "{{#each enumerateMe}}{{ @root.enumerateMe.[@key] }} {{/each}}";
var data = new
{
enumerateMe = new Dictionary<string, object>
{
{ "foo", "hello" },
{ "bar", "world" }
}
};
Expected result: "hello world "
Actual result: "foo bar "
I've found similar behaviour described in handlebars-lang/handlebars.js/pull/569
If mentioned behaviour is expected I'd like to volunteer to create a PR.
The following syntax is not correct for indexer accessor:
Expected result:
"FooBar"Actual result:
""As well as for property accessor:
Expected result:
"hello world "Actual result:
"foo bar "I've found similar behaviour described in handlebars-lang/handlebars.js/pull/569
If mentioned behaviour is expected I'd like to volunteer to create a PR.