流星路线未注册

时间:2014-09-11 22:28:23

标签: javascript json mongodb meteor bson

我在下面的这个问题中包含了3个文件的相关摘要......

routes.js https://bpaste.net/show/657823862ec3
publications.js https://bpaste.net/show/68f368befc02
institution.html https://bpaste.net/show/dab1e7caf0bf

不确定路由未注册的原因。 Exception in defer callback: Error: Oh no! No route found for path: "/institution/W4TPyFfrZpSCErrKK“。

在mongo的“机构”集合中有一个与此相关的文档,如下所示。此外,该集合在我的主js文件中通过Institutions = new Meteor.Collection('institutions');

定义
{
  "admin": "John Doe",
  "title": "MIT Bitcoin Club",
  "type": "Club",
  "school": "MIT",
  "description": "Bitcoin is a new technology that’s revolutionizing the transactional economy.",
  "members": [
    "John Doe",
    "Joe Clan"
  ],
  "_id": "W4TPyFfrZpSCErrKK"
}

1 个答案:

答案 0 :(得分:1)

而不是:

this.route('institution'), {
  ...
}

你应该:

this.route('institution', {
  ...
});