text: Template.appLayout.rendered = function () {
    Session.set('currentTab', 'trending');
  };
  
  Template.appLayout.events({
    'click [data-action=share-product]': function (event, template) {
      IonActionSheet.show({
        titleText: 'Share Product',
        buttons: [
          { text: '<i class="icon ion-social-twitter"></i> Tweet' },
          { text: '<i class="icon ion-ios-email"></i> Email' },
        ],
        cancelText: 'Cancel',
        buttonClicked: function(index) {
          if (index === 0) {
            console.log('Tweet!');
          }
          if (index === 1) {
            console.log('Email!');
          }
          return true;
        }
      });
    },
    'click [data-action=sort-product]': function (event, template) {
      console.log(template);
      console.log(this);
      Session.set('sortBy', this._id);
    }
  });
  