Created
October 22, 2012 00:34
-
-
Save gabrielhpugliese/3929083 to your computer and use it in GitHub Desktop.
Facebook trouble
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
Template.body.connected = function(){ | |
return Meteor.userLoaded(); | |
}; | |
Template.body.have_game = function(){ | |
//get into game ... | |
} | |
Template.index.created = function(){ | |
//list facebook friends | |
} | |
Template.body.created = function() { | |
Session.set('have_game', false); | |
}; | |
Template.body.have_game = function() { | |
// Do some stuff first then: | |
return Session.get('have_game'); | |
} | |
// Templates: | |
<template name="body"> | |
{{#if connected}} | |
{{#if have_game}} | |
{{> game}} | |
{{/if}} | |
{{#unless have_game}} | |
{{> index}} | |
{{/unless}} | |
{{/if}} | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment