mirror of https://gitee.com/bigwinds/arangodb
19 lines
507 B
JavaScript
19 lines
507 B
JavaScript
/*jslint indent: 2, nomen: true, maxlen: 100, vars: true, white: true, plusplus: true*/
|
|
/*global EJS, window*/
|
|
(function() {
|
|
"use strict";
|
|
var TemplateEngine = function() {
|
|
var exports = {};
|
|
exports.createTemplate = function(id) {
|
|
var template = $("#" + id.replace(".", "\\.")).html();
|
|
return {
|
|
render: function(params) {
|
|
return _.template(template, params);
|
|
}
|
|
};
|
|
};
|
|
return exports;
|
|
};
|
|
window.templateEngine = new TemplateEngine();
|
|
}());
|