Skip to content

Instantly share code, notes, and snippets.

@bitomule
Created July 28, 2014 12:22
Show Gist options
  • Save bitomule/6f3e3d6387a1a2e7f1c3 to your computer and use it in GitHub Desktop.
Save bitomule/6f3e3d6387a1a2e7f1c3 to your computer and use it in GitHub Desktop.
this.route('project',{
path: '/:_domain/projects/:_project',
layoutTemplate: 'privateLayout',
loadingTemplate: 'loading',
data: function(){
return {'domainname':this.params._domain};
},
waitOn: function(){
return [subs.subscribe('userDomain',this.params._domain),subs.subscribe('projects'),subs.subscribe('tasks'),subs.subscribe('images')];
},
onAfterAction: function(){
document.title = "Project";
if(this.ready())
{
if(Domains.find().count() === 0) {
Router.go('register');
}
if(Projects.find().count() === 0) {
Router.go('home',{_domain:this.params._domain});
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment