Closed tvogt closed 6 years ago
my mistake, or something that could be made more clear in the documentation.
solution:
Template.default.onCreated(function () { /* ... */ });
Template.default.onRendered(function () { /* ... */ });
Template.default.onDestroyed(function () { /* ... */ });
Template.default.helpers({ /* ... */ });
Template.default.events({ /* ... */ });
must use the name of the template. I wrongly assumed that "layout" is a built-in function.
Hello @tvogt ,
I'm glad you've figured it out on your own. Our Templating docs starts with create layout.
I'm having an issue:
import { Template } from 'meteor/templating'; import './default.html';
// As example all available Template's callbacks // layout should be considered as a regular template Template.layout.onCreated(function () { / ... / }); Template.layout.onRendered(function () { / ... / }); Template.layout.onDestroyed(function () { / ... / }); Template.layout.helpers({ / ... / }); Template.layout.events({ / ... / });