【发布时间】:2014-01-08 16:56:02
【问题描述】:
我想通过mysite.com/meteorapp/... 而不是mysite.com/... 提供流星多页应用程序。
因为我有很多页面,我不想写类似的东西
base = '/meteorapp/';
this.route('about-us', {
path: base+'about-us',
template: 'about-us'
});
对于每一页。
有没有办法为所有路由设置一个“基础”?
【问题讨论】:
-
我不知道,我认为这不是 IronRouter 的作用。您应该查看 ROOT_URL 环境变量:docs.meteor.com/#meteor_absoluteurl,在启动您的应用程序之前尝试将其设置为“mysite.com/meteorapp/”。
标签: meteor iron-router