Skip to content

Instantly share code, notes, and snippets.

@possibilities
Created July 31, 2012 02:25
Show Gist options
  • Save possibilities/3212907 to your computer and use it in GitHub Desktop.
Save possibilities/3212907 to your computer and use it in GitHub Desktop.
{{#if widgetsLoading}}
<p>loading widgets...</p>
{{else}}
{{#ifAny widgets}}
{{#each widgets}}
<p>Name: {{name}}</p>
{{/each}}
{{/ifAny}}
{{/if}}
Session.set('widgets.loading', true);
Meteor.subscribe('widgets', function() {
Session.set('widgets.loading', false);
});
Template.widgets.widgetsLoading = function() {
return Session.get('widgetsloading');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment