MeteorJs RouteController' HomeController'没有定义

时间:2014-11-09 08:26:27

标签: javascript meteor iron-router

我正在尝试使用eventedmind'em'工具来创建项目。我用'em'创建了一条路线。 'em'在'/both/router/routes.js'中创建了一个路由,'/client/controllers/home.js为HomeController,'/ client / views / home'文件夹中包含html css和js文件。

可以删除错误我将'controllers'文件夹放在项目的根目录或'both'文件夹中但是将'controllers'文件夹保留在其默认位置(在客户端文件夹中),应用程序会出错。

错误:

RouteController 'HomeController' is not defined.
at resolve (packages/iron:router/lib/route.js:91)
at Function.Route.findControllerConstructor (packages/iron:router/lib/route.js:113)
at Function.Route.createController (packages/iron:router/lib/route.js:131)
at Function.Router.createController (packages/iron:router/lib/router.js:185)
at Function.Router.dispatch (packages/iron:router/lib/router_server.js:29)
at Object.router (packages/iron:router/lib/router.js:15)
at next (/home/david/.meteor/packages/webapp/.1.1.4.1hc4z6t++os+web.browser+web.cordova/npm/node_modules/connect/lib/proto.js:190:15)
at Function.app.handle (/home/david/.meteor/packages/webapp/.1.1.4.1hc4z6t++os+web.browser+web.cordova/npm/node_modules/connect/lib/proto.js:198:3)
at Object.fn [as handle] (/home/david/.meteor/packages/webapp/.1.1.4.1hc4z6t++os+web.browser+web.cordova/npm/node_modules/connect/lib/proto.js:74:14)
at next (/home/david/.meteor/packages/webapp/.1.1.4.1hc4z6t++os+web.browser+web.cordova/npm/node_modules/connect/lib/proto.js:190:15)

有人可以指导我出了什么问题以及如何在不更改文件夹位置的情况下纠正错误。

0 个答案:

没有答案