Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Single Page Apps - Sammy + Mustache
<script src="Scripts/jquery-2.0.2.js"></script>
<script src="Scripts/mustache.js"></script>
<script src="Scripts/sammy-0.7.4.js"></script>
<script src="Scripts/sammy.mustache.js"></script>
var app = $.sammy(function() {
// include the plugin and alias mustache() to ms()
this.use('Mustache', 'ms');
// to see this you will need to go to
// yourpage#/hello/AName
this.get('#/hello/:name', function() {
// set local vars
this.title = 'Hello!' =;
// render the template and pass it through mustache
$(function() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment