use directories for structure
This commit is contained in:
32
node_modules/ejs-render-remote/ejs-render-remote.js
generated
vendored
32
node_modules/ejs-render-remote/ejs-render-remote.js
generated
vendored
@@ -37,14 +37,18 @@
|
||||
}
|
||||
|
||||
var r = uuidv4();
|
||||
getTemplateFn.then(function(template) {
|
||||
getTemplateFn.done(function(template) {
|
||||
var templateOptions = overwriteWithCacheOptions(options, templateUrl);
|
||||
|
||||
$('#' + r).replaceWith(ejs.render(
|
||||
template,
|
||||
data,
|
||||
templateOptions
|
||||
));
|
||||
try {
|
||||
$('#' + r).replaceWith(ejs.render(
|
||||
template,
|
||||
data,
|
||||
templateOptions
|
||||
));
|
||||
} catch(ex) {
|
||||
$.readyException(ex);
|
||||
}
|
||||
|
||||
//clean up the getFnFor
|
||||
if (ejs.cache.remove && ejs.cache.get('getFnFor' + templateUrl)) {
|
||||
@@ -64,12 +68,16 @@
|
||||
d.resolve(templateUrl);
|
||||
} else {
|
||||
$.get(templateUrl)
|
||||
.then(function(template) {
|
||||
var templateOptions = overwriteWithCacheOptions(options, templateUrl);
|
||||
var templateFn = ejs.compile(template, templateOptions);
|
||||
ejs.cache.set(templateUrl, templateFn);
|
||||
|
||||
d.resolve(templateUrl);
|
||||
.done(function(template) {
|
||||
try {
|
||||
var templateOptions = overwriteWithCacheOptions(options, templateUrl);
|
||||
var templateFn = ejs.compile(template, templateOptions);
|
||||
ejs.cache.set(templateUrl, templateFn);
|
||||
d.resolve(templateUrl);
|
||||
} catch(ex) {
|
||||
$.readyException(ex);
|
||||
d.reject(ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user