Javascript 角度ng重复导致NaN
我正在使用ng repeat遍历API的内容,并且我遇到了名称中有斜杠的项的问题。例如,这项工作:Javascript 角度ng重复导致NaN,javascript,angularjs,Javascript,Angularjs,我正在使用ng repeat遍历API的内容,并且我遇到了名称中有斜杠的项的问题。例如,这项工作: <ul ng-controller="StandingsCtrl" class="list-inline"> <div ng-repeat="standing in standings.results"> <li><h3>{{ standing.musher }}</h3></li>
<ul ng-controller="StandingsCtrl" class="list-inline">
<div ng-repeat="standing in standings.results">
<li><h3>{{ standing.musher }}</h3></li>
</div>
</ul>
这有什么把戏吗?我没有收到任何控制台错误。使用角度1,而不是2。使用此符号
{{standing['musher/'u text']}
:
<ul ng-controller="StandingsCtrl" class="list-inline">
<div ng-repeat="standing in standings.results">
<li><h3>{{ standing['musher/_text'] }}</h3></li>
</div>
</ul>
- {{站着['musher/_text']}
当使用{{standing.musher//u text}}
时,Angular将其计算为一个除法:“http://iditarod.com/race/2015/mushers/92-Mitch-Seavey/“/undefined
,这将导致NaN
<ul ng-controller="StandingsCtrl" class="list-inline">
<div ng-repeat="standing in standings.results">
<li><h3>{{ standing['musher/_text'] }}</h3></li>
</div>
</ul>