Created
July 28, 2014 12:22
-
-
Save bitomule/6f3e3d6387a1a2e7f1c3 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
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