【发布时间】:2016-10-19 13:48:12
【问题描述】:
我有这张桌子:
<table class="table tenant-table text-center">
<thead>
<tr>
<th class="text-center">
<i class="fa fa-per"></i> Date
</th>
<th class="text-center">
<i class="fa fa-calendar"></i> Result
</th>
<th> </th>
</tr>
</thead>
<tbody>
<tr ng-repeat="(k, v) in loanapps track by $index">
<td data-th="Date">{{v.ApplicationDate | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td data-th="Result">
<a ng-if="v.LoanStatus == 'Approved'" ui-sref="approved({loanid: {{v.ApplicationId}}})" class="btn dark btn-sm btn-outline sbold uppercase">
<i class="fa fa-share"></i> View
</a>
</td>
</tr>
</tbody>
</table>
我正在尝试包含一个参数,即已批准重定向的应用程序 ID,但我无法在 url 中包含该值。我采用的 ui-sref 方法是正确的还是需要做一些调整?
【问题讨论】:
-
应该是
ui-sref="approved({loanid: v.ApplicationId})" -
@tanmay 一旦我进入另一个控制器i.gyazo.com/de4c2781fb8d750c9905cd6885012a43.png
-
状态也可能有问题..你能分享一下 stateProvider 代码吗?
标签: angularjs angularjs-scope angular-ui-router angularjs-ng-repeat angular-routing