我正在为我的流星项目使用铁路由器,一切都很顺利,但我只是遇到了一些奇怪的行为.
我有一个循环设置为一个看起来像这样的项目列表.
{{#each list_items}}
<div>{{user.username}}
<a href="{{link}}">Click here!</a>
</div>
{{/each}}
Run Code Online (Sandbox Code Playgroud)
我的用户的JSON对象如下所示:
{
user: {
username: jdoe
},
images: {
low-res-url: http://example.com
},
link: http://example.com/profile
}
Run Code Online (Sandbox Code Playgroud)
现在{{user.username}}按预期显示,但当我尝试将{{link}}放入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?"
Run Code Online (Sandbox Code Playgroud)
任何帮助或建议将不胜感激.