Skip to content

Instantly share code, notes, and snippets.

@quirkey
Created November 3, 2010 00:19
Show Gist options
  • Save quirkey/660577 to your computer and use it in GitHub Desktop.
Save quirkey/660577 to your computer and use it in GitHub Desktop.
var myApp = $.sammy(function() {
this.helpers({
loadIndex: function() {
// you can do everything you would do in a route here.
}
});
this.get('#/index', function() {
this.loadIndex();
});
})
// overriding:
myApp.helpers({
loadIndex: function() {
// new index
}
})
// or as a plugin
var overrideApp = function(app) {
app.helpers({
loadIndex: function() { ... }
});
};
myApp.use(overrideApp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment