简体   繁体   English

流星自动变形示例全部生成空白页/无内容

[英]meteor-autoform examples all generate blank pages/no content

Good morning, 早上好,

I've used aldeed's simple-schema and collection2 with no problems. 我已经使用aldeed的简单模式和collection2了,没有问题。 What I wanted to to now is use the auto-form package ( https://github.com/aldeed/meteor-autoform#a-basic-insert-form ), more specifically one of the examples. 我现在想要的是使用自动表单包( https://github.com/aldeed/meteor-autoform#a-basic-insert-form ),更具体地说是示例之一。

For simplicity purposes, I'm still trying to make the first example work: 为了简单起见,我仍在尝试使第一个示例起作用:

autoform.html autoform.html

    <head>
    <title>autoForm</title>
</head>

<body>
    {{> insertBookForm}}
</body>

<template name="insertBookForm">
    {{> quickForm collection="Books" id="insertBookForm" type="insert"}}
</template>

common.js common.js

    Books = new Mongo.Collection("books");
Books.attachSchema(new SimpleSchema({
    title: {
        type: String,
        label: "Title",
        max: 200
    },
    author: {
        type: String,
        label: "Author"
    },
    copies: {
        type: Number,
        label: "Number of copies",
        min: 0
    },
    lastCheckedOut: {
        type: Date,
        label: "Last date this book was checked out",
        optional: true
    },
    summary: {
        type: String,
        label: "Brief summary",
        optional: true,
        max: 1000
    }
}));

The problem is that I always get a blank page. 问题是我总是得到空白页。 There's no error shown in the meteor app terminal. 流星应用程序终端中没有显示任何错误。

Best regards 最好的祝福

我遇到了同样的问题,请尝试添加流星add ongoworks:security这应该add ongoworks:security您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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