部署后Meteor,autoform模式错误

时间:2015-05-06 13:21:39

标签: javascript meteor schema meteor-autoform

我的应用使用autoform。我部署了它。 在本地测试中我没有任何问题

部署后,我在控制台中收到一条错误消息:

"Error: AutoForm: form with id "newTerritoryForm" needs either "schema" or "collection" attribute"

我在common.js中定义架构:

Schemas={};

Schemas.newTerritories= new SimpleSchema({
    name:{
        type: String,
        label: 'Nome'
    },
    number:{
        type: Number,
        label: 'Numero'
    }
});

我的客户方是:

Template.territories.helpers({
    Schemas: function(){
        return Schemas;
    },
...
});

我的HTML是:

<div class="ui bottom attached segment">
{{#autoForm schema=Schemas.newTerritories id="newTerritoryForm" class="ui form fluid" type="method" meteormethod="newTerritory"}}
...
{{/autoForm}}
</div>

我再说一遍,如果在本地机器上它可以工作,但在部署之后,它就不起作用了。

为什么?

0 个答案:

没有答案