I’m reading the docs of the aldeed:tabular package
https://github.com/aldeed/meteor-tabular#example
The docs say:
TabularTables = {};
TabularTables.Books = new Tabular.Table({
name: "Books",
collection: Books,
They are assuming that a books collection has previously been defined as
in:
Books = new Mongo.Collection("books");
I feel a constraint on the strings that may be used as attributes of the Tabular.Tables object…
I mean, if I try the following change:
TabularTables = {};
TabularTables.xyz = new Tabular.Table({
name: "Books",
collection: Books,
I get the following error:
Error: You must pass Tabular.Table instance as the table attribute
at .<anonymous> (tabular.js:132)
at view.js:199
at Function.Template._withTemplateInstanceFunc (template.js:465)
at view.js:197
at Object.Blaze._withCurrentView (view.js:538)
at viewAutorun (view.js:196)
at Tracker.Computation._compute (tracker.js:311)
at new Tracker.Computation (tracker.js:201)
at Object.Tracker.autorun (tracker.js:576)
at Blaze.View.autorun (view.js:209)
Is this expected behaviour, or am I doing something wrong?