Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.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
Ember.js 余烬js中的行链接_Ember.js - Fatal编程技术网

Ember.js 余烬js中的行链接

Ember.js 余烬js中的行链接,ember.js,Ember.js,我想给整个行的链接。 我搜索了几个示例,但它们都提供了指向单个的链接 以下是我尝试过的: <table class="table"> <thead> <tr> <th>Leave Type</th> <th>Approved Leaves</th>

我想给整个行的链接。 我搜索了几个示例,但它们都提供了指向单个
的链接

以下是我尝试过的:

         <table class="table">  
           <thead>  
             <tr>  
              <th>Leave Type</th>  
              <th>Approved Leaves</th>  
              <th>Balance Leaves</th>
              </tr>  
            </thead>  
            <tbody>  
             {{#each}}
             <tr>  
                <td>{{#link-to 'pastrequests' this}}{{leavetypes}}{{/link-to}}</td>  
                <td>{{approvedleaves}}</td>  
                <td>{{balanceleaves}}</td> 

              </tr>
              {{/each}}                  
            </tbody>  
           </table> 

休假类型
批准的假期
平衡叶
{{{#各}
{{{#链接到'pastrequests'this}{{{leavetypes}}{{/链接到}}
{{approvedleaves}}
{{balanceleaves}}
{{/每个}}

应该在“tr”上,而不是在“td”上。

您应该将链接放在
tr
元素上。不要忘记指定以下选项:


{{{#各}
{{#链接到'pastrequests'这个标记名='tr'}
{{leavetypes}}
{{approvedleaves}}
{{balanceleaves}}
{{/链接到}
{{/每个}}
{{{#链接到'pastrequests'this}{{{leavetypes}}{{approvedleaves}}{{balanceleaves}}{{/link to}}我已经这样做了,但对我来说并不奏效。。
{{#link-to 'pastrequests' this}}
<tbody>  
  {{#each}}
    {{#link-to 'pastrequests' this tagName='tr'}}  
      <td>{{leavetypes}}</td>  
      <td>{{approvedleaves}}</td>  
      <td>{{balanceleaves}}</td> 
    {{/link-to}}
  {{/each}}                  
</tbody>