Skip to content

Instantly share code, notes, and snippets.

@gabrielhpugliese
Created January 13, 2015 23:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielhpugliese/e95297a54a7c24dadd6a to your computer and use it in GitHub Desktop.
Save gabrielhpugliese/e95297a54a7c24dadd6a to your computer and use it in GitHub Desktop.
DetalheAnuncioIndexController = RouteController.extend({
waitOn: function () {
Meteor.subscribe('users');
return Meteor.subscribe('listarAnuncios');
},
data: function () {
return Anuncios.findOne(this.params.id);
},
onBeforeAction: function () {
if (Anuncios.findOne(this.params.id)) {
Session.set('selectedDays', Anuncios.findOne(this.params.id).unavailableDays);
}
this.next();
},
action: function () {
this.render();
}
});
<template name="bla">
{{#if hasAccessories accessories}}
AQUI
{{else}}
ALI
{{/if}}
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment