Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Meteor Iron路由器:不识别对象数据的路径_Meteor_Iron Router - Fatal编程技术网

Meteor Iron路由器:不识别对象数据的路径

Meteor Iron路由器:不识别对象数据的路径,meteor,iron-router,Meteor,Iron Router,我以前做过100次,但我从一个简单的铁路由器链接中得到了一些奇怪的功能 我已设置了链接: <a href="{{pathFor 'templateName' this.pathId }}">Show</a> 就在链接旁边,它给了我正确的ID 此外,我对它进行了一点黑客攻击,并使用this.pathId使Router.go的链接触发了一个事件,它工作得很好 只是帮手给了我麻烦 任何帮助都将不胜感激。我可能错过了一些简单的东西。很晚了。我使用的是Meteor 1.0.3和I

我以前做过100次,但我从一个简单的铁路由器链接中得到了一些奇怪的功能

我已设置了链接:

<a href="{{pathFor 'templateName' this.pathId }}">Show</a>
就在链接旁边,它给了我正确的ID

此外,我对它进行了一点黑客攻击,并使用this.pathId使Router.go的链接触发了一个事件,它工作得很好

只是帮手给了我麻烦

任何帮助都将不胜感激。我可能错过了一些简单的东西。很晚了。我使用的是Meteor 1.0.3和Iron Router 1.07,替换为此

<a href="{{pathFor 'templateName' _id=this.pathId }}">Show</a>
像这样使用它

<a href="{{pathFor templateName}}">Show</a>
你也可以这样做

<a href="/templateName{{this.pathId}}">Show</a>

Thx,奇怪的是,它在其他地方没有id的情况下工作……是时候重构了。
<a href="{{pathFor templateName}}">Show</a>
<a href="/templateName{{this.pathId}}">Show</a>