流星表格

时间:2016-05-30 09:03:55

标签: meteor tabular

我正在尝试使用aldeed-tabular获取所有用户的列表,但它不起作用,请帮助!

LIB / Users.js

    TabularTables = {};
Meteor.isClient && Template.registerHelper('TabularTables', TabularTables);
TabularTables.UserList = new Tabular.Table({
  name: "Users List",
  collection: Meteor.users,
  columns: [
    {data: "email()", title: "firstName", class: "col-md-1"},
    {data: "lastName", title: "lastName", class: "col-md-3"},

]});

      **Client/UsersList.js**

    <template name="tabular">

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

</template>

1 个答案:

答案 0 :(得分:0)

查看此Meteor forum,讨论如何显示具有特定角色的用户。由于您只想获得所有用户,因此您的案例更容易。