Good morning,
I've used aldeed's simple-schema and collection2 with no problems. 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.
For simplicity purposes, I'm still trying to make the first example work:
autoform.html
<head>
<title>autoForm</title>
</head>
<body>
{{> insertBookForm}}
</body>
<template name="insertBookForm">
{{> quickForm collection="Books" id="insertBookForm" type="insert"}}
</template>
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
您有所帮助。
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.