Option to change default template location
So far I must load my templates like this:
// In App file:
require(['jquery','hbs!/assets/templates/contact/phone'],
// In main require file:
hbs: {
disableI18n: true,
partialsUrl: '/assets/templates'
}
However, even if set partialsUrl: '/assets/templates' the following line fails:
require(['jquery','hbs!contact/phone'],
The above line (instead full path), searches from hbs folder:
GET (0.0012s) /assets/vendors/contact/phone.hbs - 404 Not Found
I do not seem to find an option to change the base template Url. Having one would save lots of typing.
I faced same problem when url starts with '/'. If url starts with './' actually start from the current template directory and look for the partial. I used it as a work-around as template configure is working. You can configure templates directory from
paths: templates: '../templates'
if you want to be outside JS dir.
I had a similar problem unable to load templates from a mocha test running with karma. Adding paths to karma require config solved it. Thanks.