19 lines
591 B
JavaScript
19 lines
591 B
JavaScript
ReactiveTabs.createInterface({
|
|
template: 'teacherTabs',
|
|
onChange: function (slug, template) {
|
|
// This callback runs every time a tab changes.
|
|
// The `template` instance is unique per {{#basicTabs}} block.
|
|
console.log('[tabs] Tab has changed! Current tab:', slug);
|
|
console.log('[tabs] Template instance calling onChange:', template);
|
|
}
|
|
});
|
|
|
|
Template.teacher.helpers({
|
|
tabs: function () {
|
|
// Every tab object MUST have a name and a slug!
|
|
return [
|
|
{ name: 'Single', slug: 'single' },
|
|
{ name: 'Carts', slug: 'carts' }
|
|
];
|
|
}
|
|
}); |