Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions jquery.mustache.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@
return key;
});
}

// Returns the template map.
// Useful to use the templates with Hogan.JS and similar libraries.
function getTemplate(templateName) {
return templateMap[templateName];
}

// Expose the public methods on jQuery.Mustache
$.Mustache = {
Expand All @@ -171,8 +177,9 @@
clear: clear,
render: render,
templates: templates,
getTemplate: getTemplate,
instance: instance
};
};

/**
* Renders one or more viewModels into the current jQuery element.
Expand Down Expand Up @@ -209,4 +216,4 @@
});
};

}(jQuery, window));
}(jQuery, window));