2017-03-09 100 views
0

我遇到了一個我無法解決的問題,也不明白是什麼原因。 模板:流星「模板助手中的異常:quickFormContext」與aldeed:autoform

<template name="home"> 
    {{> quickForm collection="Posts" id="insertPostForm" type="insert"}} 
</template> 

的路線(鐵:路由器):

Router.route('/', { 
    name: "home", 
    data: function() { 
     return { 
      posts: Posts.find(); 
     }; 
    }, 
    waitOn: function() { 
     return Meteor.subscribe("allPostHeaders"); 
    } 
}); 

我出版了 「allPostHeaders」:

Meteor.publish("allPostHeaders", function(){ 
    return Posts.find({}, { 
     fields: {content: 0} 
    }); 
}); 

所以在流星我安裝iron:routeraldeed:collection2aldeed:autoform以及installnpm simpl-schema

所以,當我啓動我的應用程序下面的異常出現..

例外模板幫手: quickFormContext @http://localhost:3000/packages/aldeed_autoform.js

我發現post但我不會忘記我的報價。所以有人可以幫助我找到我錯過的東西?

+0

如果你在html中註釋掉quickform行,它工作嗎? – mutdmour

+0

沒有模板中的quickform行它工作 – AdChiv

+0

你爲什麼'npm安裝simple-schema'而不是使用[meteor package](https://github.com/aldeed/meteor-simple-schema)? – mutdmour

回答

0

我解決了它。

問題出在安裝。使用autoform 6+(autoform的最新版本),我們無法安裝aldeed:collection2,但使用:collection2-core來安裝單獨的簡單模式。

相關問題