我在学meteor 0.8.3
并尝试使用一些基本的路由设置铁路由器 https://github.com/EventedMind/iron-router
My smart.json
包含:
{
packages: {
iron-router: {
git: https://github.com/EventedMind/iron-router.git,
branch: blaze-integration
}
}
}
我添加了这个,然后运行mrt install
and mrt update
然后我这样做了,并得到了这个错误:
$ meteor add iron:router
iron-router: updating npm dependencies -- connect...
iron:router: no such package
我仍然可以运行该应用程序mrt
,应用程序启动,但我得到Uncaught TypeError: Cannot read property 'extend' of undefined
来自layout.js:92,页面上没有显示任何内容。
我的路由器块如下所示:
Router.map( function() {
this.route('home', { path: '/' });
this.route('create');
this.route('tasksShow', {
path: '/tasks/:_id',
data: function() { return Tasks.findOne(this.params._id); }
});
});
我做错了什么,如何让iron-router工作?
IronRouter的安装:
Meteor 0.8.3 及更早版本
$ mrt add iron-router
流星 0.9.0 及更高版本
$ meteor add iron:router
有关此问题的更多信息请参见此处:Iron-router(最新)在 Windows 7 x64 (Meteor 0.8.3) 上的安装问题 https://stackoverflow.com/questions/25352582/installation-issues-with-iron-router-newest-on-windows-7-x64-meteor-0-8-3/25353164#25353164
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)