Created
August 28, 2015 15:26
-
-
Save iamjohnlong/bf30a0bd32608fb7131f to your computer and use it in GitHub Desktop.
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
// The profile model | |
var profile = require('./profile').get() | |
profile.then(function() { | |
AppRouter() | |
}, function() { | |
LoginRouter() | |
}) | |
function AppRouter() { | |
document.body.id = 'authenticated' | |
m.route(document.body, '/', { | |
'/': YourAppComponent | |
}) | |
} | |
function LoginRouter() { | |
document.body.id = 'login' | |
m.route(document.body, '/', { | |
'/': YourLoginComponent | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment