What if we don't want to include all the templates in our application? An example is a Rails site that may have multiple backbone apps. We don't always want to pull in all the templates.
If we specify
//= require ./templates/foo/bar
then HandlebarsTemplates'foo/bar'; should work, but it doesn't because for some reason HandlebarsTemplates becomes undefined.
Using the following require is the only way to get the templates added to the global namespace automatically.
//= require_tree ./templates
HandlebarsTemplates'contacts/new';
What if we don't want to include all the templates in our application? An example is a Rails site that may have multiple backbone apps. We don't always want to pull in all the templates.
If we specify
//= require ./templates/foo/bar
then HandlebarsTemplates'foo/bar'; should work, but it doesn't because for some reason HandlebarsTemplates becomes undefined.