Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
ender.js wrapper for mustache.js logic-less templates
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
make
src
tests
.gitignore
Makefile
README.md
ender-mustache.js
ender-mustache.min.js
package.json

README.md

Mustache.js + Ender

Overview

This is a wrapper around mustache templates to make them play nice with ender.

Usage

You can add the plugin to your build with ender add ender-mustache. If a template is publically available at http://yourdomain.com/path/to/template.mustache then you can get the result of rendering the template with ...

var result = $.render('/template/path.mustache', {variable: 'value'})

... or automatically insert it into a parent element with ...

$.render('/template/path.mustache', {variable: 'value'}, '#some .selector')

Known Issues

  • I'm currently loading every template with an Ajax request. In production mode it should include precompiled templates in the javascript build using hogan.

  • I use document.querySelectorAll which is going to break in IE 6 & 7.

Something went wrong with that request. Please try again.