This extremely simple Meteor app is throwing a Template is not defined
error on load. The app is essentially identical to the boilerplate project (meteor create
), just split into server/client/public directories.
Meteor seems to be trying to render the Handlebars template
tags before the global Template object is actually ready. By the time I can get to the JS console and type "Template", it is there.
Have I done something wrong, or is this a timing bug?
You need to make sure in your .js file which calls the Template is wrapped in if (Meteor.isClient){}
, otherwise the Template
global var won't be available for some reason.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With