我正在从儿子对象显示下面的图像。在那个儿子对象我有每个图像的名称,我需要在相应的下显示图像的名称。
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding StringFormat=Version {0}}" />
</DataTemplate>
</ComboBox.ItemTemplate>
答案 0 :(得分:1)
只需添加表达式即可在ng-repeat中显示图像名称。
<ion-scroll direction="x" class="item row" id="galleryline1">
<div class="first_row" id="firstrow">
<div>
<div ng-repeat="image in allimages">
<img ng-src="{{image.src}}" ng-click="showImages(image.title)" class="image-list-thumb"/><br />
<span>{{image.name}}</span>
</div>
</div>
</div>
</ion-scroll>
答案 1 :(得分:0)
调整 HTML ,如下所示:
<ion-scroll direction="x" class="item row" id="galleryline1">
<div class="first_row" id="firstrow">
<div ng-repeat="image in allimages">
<img ng-src="{{image.src}}" ng-click="showImages(image.title)" class="image-list-thumb"/>
<h4 ng-bind="image.name"></h4>
</div>
</div>
</ion-scroll>
答案 2 :(得分:0)
您的角度模板构造错误。
您需要在父元素上执行角度图像迭代。像这样:
<ion-scroll direction="x" class="item row" id="galleryline1">
<div class="first_row" id="firstrow">
<div ng-repeat="image in allimages">
<img ng-src="{{image.src}}" ng-click="showImages(image.title)" class="image-list-thumb"/>
</div>
</div>
</ion-scroll>
答案 3 :(得分:0)
请试试这个:
<ion-scroll direction="x" class="item row" id="galleryline1">
<div class="first_row" id="firstrow">
<div ng-repeat="image in allimages">
<img ng-src="{{image.src}}" ng-click="showImages(image.title)" class="image-list-thumb"/>
<h3 ng-bind="image.name"></h3>
</div>
</div>
</ion-scroll>
答案 4 :(得分:0)
类似的东西?
<ion-scroll direction="x" class="item row" id="galleryline1">
<div class="first_row" id="firstrow">
<div ng-repeat-start="image in allimages" class="image-list-thumb-img">
<img ng-src="{{image.src}}" ng-click="showImages(image.title)"/>
</div>
<div ng-repeat-end class="image-list-thumb-note">{{image.name}}</div>
</div>
</ion-scroll>