Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using multiple pre compiled templates #113

Open
fmachi opened this issue Aug 20, 2014 · 0 comments
Open

Using multiple pre compiled templates #113

fmachi opened this issue Aug 20, 2014 · 0 comments

Comments

@fmachi
Copy link

fmachi commented Aug 20, 2014

Ciao!
We're using grunt-contrib-handlebars in a single page application framework with some different applications. They share some templates, for example a layout.m and for each of this application we create a different pre compiled file, something like:

  • app1-templates.js
  • app2-templates.js
    ...
    Since they share some templates, when we load the different pre compiled files, we have that templates with the same name are overwritten into the Handlebars object.
    In particular, in each file we have:

Handlebars.registerPartial('layout',......)

so, the last processed overwrites the previous one. Is there any way to load different pre-compiled templates into the same Handlebars object (inside a node.js App) avoiding this issue?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant