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

cannot call partial without load, just passing html. #5

Open
miramardesign opened this issue Sep 16, 2020 · 0 comments
Open

cannot call partial without load, just passing html. #5

miramardesign opened this issue Sep 16, 2020 · 0 comments

Comments

@miramardesign
Copy link

great little lib. btw.

so i am using this with webpack. (dont ask why)

I'm happily loading the main template like this and it works great:

import HTML from './about.rebars.hbs';

Handlebars,
			template: HTML,
			data: {

(i had to use webpack raw-loader, fyi)

but when i try to load a partial similarly:

import manifestDescriptionHTML from '../../partials/manifestDescription.rebars.hbs';

			partials: {
				manifestDescription: manifestDescriptionHTML

i get error:
Uncaught (in promise) Exception {description: undefined, fileName: undefined, lineNumber: undefined, endLineNumber: undefined, message: "Attempting to register a partial called "manifestDescription" as undefined", …}

it seems to want a .load(url) (which doesnt work with webpack)

I can do :
app.instance.registerPartial('manifestDescription', manifestDescriptionHTML);
which isn't terrible but seems inconsistent.

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