Last active
September 22, 2015 15:14
-
-
Save bendrucker/8aa06e7ac3a613c3da5f to your computer and use it in GitHub Desktop.
Playing with routing ideas
This file contains hidden or 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
| Router.hook(route.profile, function (state) { | |
| state.put('profile', Profile()) | |
| }) | |
| Router.unhook(route.profile, function (state) { | |
| state.delete('profile') | |
| }) | |
| Router.hook(route.order, function (state, params, callback) { | |
| var order = Order({id: params.id}) | |
| state.put('order', id) | |
| Order.fetch(order, callback) | |
| return Order.poll(order).cancel | |
| }) | |
| Router.unhook(route.order, function (state) { | |
| state.delete('order') | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment