-
Notifications
You must be signed in to change notification settings - Fork 56
API Strawman[s]
hij1nx edited this page Sep 11, 2011
·
1 revision
var router = new Router({
'/foo': fooLogic
});
var router = new Router({
'/foo': {
'/bar': barLogic
'/bazz': bazzLogic
}
});
var router = new Router({
'/foo': {
'/bar': barLogic
'/bazz': bazzLogic
on: fooOn
after: fooAfter
}
});
var router = new Router({
'/foo': {
'/bar': barlogic // no event type specified, synonymous with GET
'/bazz':
get: fooGetLogic,
post: fooPostLogic,
on: fooLogic // on synonymous with GET
}
});
var router = new Router();
router.routes('/foo', function() {
this.route('/bar', function() { ... });
this.route('/bazz', function() {
this.route('bla', function() { ... });
});
});
the above is directly taken from the current work found in sugarskull.js