Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save deanrad/e7fea266dbfa4c9097b3eb733bdb6f04 to your computer and use it in GitHub Desktop.
Save deanrad/e7fea266dbfa4c9097b3eb733bdb6f04 to your computer and use it in GitHub Desktop.
Template.restaurant.onCreated(function() {
this.restaurant = new ReactiveVar()
this.ready = new ReactiveVar( false )
this.subscribe( 'Restaurant', [ FlowRouter.getParam('restaurantId') ] )
.readyPromise()
.then(function() {
this.restaurant.set( Restaurant.findOne() )
this.ready.set( true )
}.bind(this))
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment