-
-
Save bradleypriest/3088762 to your computer and use it in GitHub Desktop.
How does the automatic find binding work?
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
App.Router = Em.Router.extend({ | |
root: Em.Route.extend({ | |
route: '/', | |
user: Em.Route.extend({ | |
route: '/:user_id/', | |
connectOutlets: function (router, context) { | |
//What is context here? | |
// it's simple in the one segment case where | |
// its the return value of find on the model. | |
}, | |
index: Em.Route.extend({ | |
redirectsTo: "post" | |
}), | |
post: Em.Route.extend({ | |
route: "/post_id" | |
}) | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment