Created
December 19, 2014 00:56
-
-
Save devdays/8b9c4cd182aedcaceae1 to your computer and use it in GitHub Desktop.
Single Page App - jQuery Require is optional with Sammy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(['sammy'], function (sammy) { | |
var app = sammy('#content', function () { | |
this.get('#/', function (context) { | |
context.log('Yo yo yo'); | |
}); | |
this.get('#/:items', function (context) { | |
context.log('Ho ho ho'); | |
}); | |
}); | |
$(function () { | |
app.run('#/'); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment