本文介绍了在 ng-repeat 之外显示值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在 ng-repeat
之外只显示一次 {{Brand.BrandDetails.Text}}
.. 我该怎么做(重复也想要).
I want to show {{Brand.BrandDetails.Text}}
only one time outside the ng-repeat
.. how can i do this (repeat also want).
<li ng-repeat="Brand in Brands">
<a href="#">
<img src="~/Images/{{Brand.BrandDetails.Image}}" class="topBrandsBrandContentImage">
<p class="darkGray fontsize13 fontWeightLight">{{Brand.BrandDetails.Presentage}}% {{Brand.BrandDetails.Text}}</p>
</a>
</li>
推荐答案
{{ Brands[0].BrandDetails.Text }}
<li ng-repeat="Brand in Brands">
<a href="#">
<img src="~/Images/{{Brand.BrandDetails.Image}}" class="topBrandsBrandContentImage">
<p class="darkGray fontsize13 fontWeightLight">{{Brand.BrandDetails.Presentage}}% {{Brand.BrandDetails.Text}}</p>
</a>
</li>
这篇关于在 ng-repeat 之外显示值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!