Created
July 25, 2014 09:46
-
-
Save aaronthorp/0d673980eb6fd7e3a41d 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
Router.onBeforeAction('loading'); | |
Router.map(function() { | |
this.route('project', { | |
path: '/:_domain/projects/:_project', | |
data: function() { | |
return {'name': this.params._domain}; | |
}, | |
waitOn: function(){ | |
return [subs.subscribe('userDomains', this.params._domain)]; | |
}, | |
onAfterAction: function() { | |
document.title = "Project"; | |
if(Domains.find().count() === 0) { | |
Router.go('register'); | |
} | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment