简体   繁体   中英

Has anyone worked with aldeed:tabular package in meteor?

I am trying aldeed:tabular package in meteor from here . Here is my code

client side:

TabularTables = {};
Books= new Mongo.Collection('books');

Meteor.isClient && Template.registerHelper('TabularTables', TabularTables);

TabularTables.Books = new Tabular.Table({
  name: "BookList",
  collection: Books,
  columns: [
    {data: "title", title: "Title"},
    {data: "author", title: "Author"},
    {data: "copies", title: "Copies Available"},


  ]
});

In html file:

{{> tabular table=TabularTables.Books class="table table-striped table-bordered table-condensed"}}

I can see the table formed but i am having problem in showing data in table. What i am doing wrong?

Maybe you defined TabularTables only on client side? Defining it as a shared resource (eg. outside the client folder) should fix your problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM