Skip to content

../ path only reaches up to the parent, not the root #245

@EntitySpaces

Description

@EntitySpaces

I'm using Handlebars.VERSION = "1.0.beta.6";

and my javascript looks like this

var data = {};
data.UI = {};
data.UI.isChecked = "true";
data.Database = database;
output = tmpl(data);

My template looks like this ...

isChecked :: {{../../UI.isChecked}}

Notice I have to use "../../" twice to climb back up to the root ( I'm deeply nested in an #each loop) I was under the understanding that a single "../" would take me up to my root object or "data" such that anywhere in my tempate I can do this

isChecked :: {{../UI.isChecked}}

no matter if i'm 14 levels nested in an {{#each}} loop, as it stands now, one has to know how many levels they are nested and use the appropriate number ../ to get back to the top, possibly 10 or more, this makes the Path feature unusable.

Here is a jsfiddle showing the issue, it's using 1.0.0.beta4.js and I have to use double "../../" ?
http://jsfiddle.net/GMrnz/42/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions