Created
September 15, 2017 12:03
-
-
Save beeblebrox3/3a9dc79b644aed1bbf0ea79159acd004 to your computer and use it in GitHub Desktop.
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
import App from "app"; | |
const Pages = App.components.pages; | |
const Router = App.service("ROUTER"); | |
Router.setDefaultLayout(App.components.Application); | |
Router.setDefaultTitle("Elydi"); | |
Router.addRoute("/", Pages.Home); | |
Router.addRoute("/another-home", Pages.Home); | |
Router.addResolver(":userID", (value, ctx, next) => { | |
App.service("Users").find(id).then(user => { | |
ctx.user = user; | |
next(); | |
}) | |
}) | |
Router.addRoute("/users/:userID", Pages.Users); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment