<div class="col-md-4 col-sm-6 col-xs-12 featured" ng-repeat="item in beds">
<div class="stars" ng-repeat="t in [item.Value.Rate]">
<i class="fa fa-star"></i>
</div>
</div>
這是我的代碼。當我想第二次使用ng-repeat時,它不起作用。我想類似的東西: 如果[item.Value.Rate]返回3,追加<i class="fa fa-star"></i>
3倍,如果它返回1,基於元素的數量只是一個<i class="fa fa-star"></i>
ng-repeat with i類
你爲什麼把周圍'item.Value.Rate'方括號?那是一個整數還是一個列表? – fodma1
可能的重複[方法ng重複定義的次數而不是重複數組?](http://stackoverflow.com/questions/16824853/way-to-ng-repeat-defined-number-of-times-而不是重複數組) –
@ fodma1它是整數 – user3188649