Skip to content

AMD precompile resolves partials inconsistent with Java implementation #550

@claytonplatts-powerschool

Description

I have a template which references another template, say something like the following:

foo.hbs
<div>Some repeated pattern {{#each listItem}} {{> bar}} {{/each} </div>

bar.hbs
<div>{{text}}</div>

If I utilize the handlebar.java plugin to resolve my views with a suffix of .hbs, this works as expected. However, if I attempt to use a blended model where the initial rendering will be done server side and subsequent renderings will be done on the client utilizing the AMD pattern. So I have something like:

main.hbs
...some HTML page... {{precompile 'foo' wrapper-'amd'}}

This will generate javascript which attempts to define the modules as foo.hbs and bar.hbs, however, the code of foo.hbs will attempt to resolve the partial as just "bar". I can resolve this by referencing the partial as {{> bar.hbs}}, but this breaks the server side resolution of the partial as it attempts to bind to bar.hbs.hbs

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions