aldeed表格不识别单元格模板

时间:2015-11-13 17:32:44

标签: meteor

我在流星项目中使用了所有包架构。 在TabularLevel中未定义CompanyButtons模板,控制台日志显示未定义,并且动作单元格中不显示任何模板。

 TabularTables = {};


Meteor.isClient &&  console.log(Template.companyButtons)

TabularTables.Companies = new Tabular.Table({
    name: "Companies",
    collection: Companies,
    columns: [
        {data: "name", title: "Name"},
        {data: "phone", title: "Phone"},
        {data: "cities", title: "City"},
        {title:"actions", width:"80%", tmpl: Meteor.isClient &&  Template.companyButtons
        }

    ]
});

模板已正确添加

  api.addFiles([
     "lib/client/templates/utility/companyButtons.html",
  ], "client");

当我调用Template.companyButtons

时,我的模板在浏览器中被识别

1 个答案:

答案 0 :(得分:0)

您的模板应在表格定义之前加载。