我为我的流星项目使用铁路由器,一切都很顺利,但我遇到了一些奇怪的行为。把手+流星+铁路由器
我有一个循环设置为看起来像这样的项目列表。
{{#each list_items}}
<div>{{user.username}}
<a href="{{link}}">Click here!</a>
</div>
{{/each}}
的JSON对象我的用户看起来是这样的:
{
user: {
username: jdoe
},
images: {
low-res-url: http://example.com
},
link: http://example.com/profile
}
现在{{user.username}}显示为预期的,但是当我尝试把{{链接}}在href我从铁路由器说
"You called Router.path for a route named undefined but that that route doesn't seem to exist. Are you sure you created it?"
任何帮助或建议,将不胜感激错误。
这做到了。谢谢! –
这是正式记录在哪里?我希望我早点知道这件事! – ecbrodie
查看Iron-Router源代码是有益的。 –