gpt4 book ai didi

javascript - angularjs 'ng-href' 不工作

转载 作者:行者123 更新时间:2023-12-04 12:25:18 25 4
gpt4 key购买 nike

我正在尝试使用 angularjs ng-href 创建指向每个 ID 的链接,但是当我刷新页面时,链接没有显示。我什至关闭了浏览器并清除了缓存,但什么也没有发生。这是我当前的代码:

 <tr ng-repeat="parcel in parcels">
<td><a ng-href="http://www.proj.com/{{ parcel.id }}/edit/"/>{{ parcel.
id }}</td>
<td>{{ parcel.tracking_id }}</td>
<td>{{ parcel.shipper_ref_no }}</td>

$scope.parcels = [];
$scope.scans = [];
$scope.missings = [];
$scope.excludeds = [];

$scope.parcels = Outbound.summaryPageData.parcels;
$scope.scans = Outbound.summaryPageData.scans;
$scope.missings = Outbound.summaryPageData.missings;
$scope.excludeds = Outbound.summaryPageData.excludeds;


});

最佳答案

我认为这是一个简单的 HTML 语法错误 - <a>标签没有内容。尝试改变这个:

<a ng-href="http://www.proj.com/{{ parcel.id }}/edit/"/>{{ parcel.id }}

到:

<a ng-href="http://www.proj.com/{{ parcel.id }}/edit/">{{ parcel.id }}</a>

关于javascript - angularjs 'ng-href' 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25141383/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com