Skip to content

Allow .length in addition to .Count on arrays #307

@johnknoop

Description

@johnknoop

If the context data has a property called myArray of type Array, this expressions renders fine using the javascript version of Handlebars:

{{myArray.length}}

However, when I compile/render with Handlebars.Net, I have to change the expression to {{myArray.Count}} to make it work. I get why that is, but it would be nice if our hbs templates would work in the Handlebars-JS as well, since we use JS-based tools for previewing etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions