Merge pull request #1632 from gausie/patch-2
Allow EJS templates to use includes
This commit is contained in:
commit
bab1d5dae8
|
@ -215,7 +215,9 @@ loopback.remoteMethod = function(fn, options) {
|
|||
loopback.template = function(file) {
|
||||
var templates = this._templates || (this._templates = {});
|
||||
var str = templates[file] || (templates[file] = fs.readFileSync(file, 'utf8'));
|
||||
return ejs.compile(str);
|
||||
return ejs.compile(str, {
|
||||
filename: file
|
||||
});
|
||||
};
|
||||
|
||||
require('../server/current-context')(loopback);
|
||||
|
|
Loading…
Reference in New Issue