纯 HTML:
<div class="table-tr museo_sans500">
<div class="table-td"><a href="javascript:void(0)">fgfbgfbfg</a></div>
<div class="table-td"><a href="javascript:void(0)">Wtrtrdgdgf</a></div>
<div class="table-td"><a href="javascript:void(0)">Wayne Rooney</a</div>
<div class="table-td"><a href="javascript:void(0)">fghgfhgfhgf</a></div>
</div>
<div class="table-tr museo_sans500">
<div class="table-td"><a href="javascript:void(0)"hgfhgfhfg</a></div>
<div class="table-td"><a href="javascript:void(0)">asdasdasdas</a></div>
<div class="table-td"><a href="javascript:void(0)">testsfsdfs</a></div>
<div class="table-td"><a href="javascript:void(0)">gfhgfhfghgf</a></div>
</div>
我需要使其动态化,并且我正在使用 Angular JS 和 PHP。我已经以角度获取数据$scope.teamSquad
并以下列方式实现它:
<div class="table-tr museo_sans500" ng-repeat="(key,squad) in teamSquad">
<div class="table-td"><a href="javascript:void(0)">{{squad.PlayerName}}</a></div>
</div>
但是我在添加</div><div class="table-tr museo_sans500">
更多值之后遇到问题。
我已经尝试过{{key%4==0 ? '</div><div class="table-tr museo_sans500">' : ''}}
,但它不起作用。
我也试过,但结果是一样的。