mirror of
https://github.com/S2-/ejs-render-remote
synced 2025-08-04 13:20:06 +02:00
Compare commits
4 Commits
c1f83b7468
...
v1.0.3
Author | SHA1 | Date | |
---|---|---|---|
6d6def3374 | |||
326e760c78 | |||
95a1708280 | |||
c4fc133475 |
@@ -33,14 +33,14 @@
|
||||
|
||||
var r = uuidv4();
|
||||
getTemplateFn.then(function(template) {
|
||||
document.getElementById(r).outerHTML = ejs.render(
|
||||
$('#' + r).replaceWith(ejs.render(
|
||||
template,
|
||||
data,
|
||||
{
|
||||
cache: true,
|
||||
filename: templateUrl
|
||||
}
|
||||
);
|
||||
));
|
||||
});
|
||||
|
||||
return '<span class="ejs-templateplaceholder" style="display: none;" id="' + r + '"></span>';
|
||||
@@ -57,17 +57,17 @@
|
||||
$.get(templateUrl)
|
||||
.then(function(template) {
|
||||
var templateFn = ejs.compile(template,
|
||||
{
|
||||
cache: true,
|
||||
filename: templateUrl
|
||||
});
|
||||
{
|
||||
cache: true,
|
||||
filename: templateUrl
|
||||
});
|
||||
|
||||
ejs.cache.set(templateUrl, templateFn);
|
||||
|
||||
d.resolve();
|
||||
d.resolve(templateUrl);
|
||||
});
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
};
|
||||
})(jQuery);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ejs-render-remote",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.3",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"homepage": "https://github.com/S2-/ejs-render-remote",
|
||||
|
Reference in New Issue
Block a user