2017-08-07 36 views
0

ngFor似乎并没有对我ngfor当弯曲方向是“行”,我的意思是它的工作原理工作,但它并排Flexlayout不支持* ngfor?

<FlexboxLayout class="itemWindow" *ngFor="let imageUrl of matchItems" 
flexDirection="row"> 
       <StackLayout class="inventoryImage"> 
         <Image width= "80" height="80" stretch="aspectFill" 
         left="5" src="{{imageUrl}}" ></Image> 
       </StackLayout> 
</FlexboxLayout > 

我究竟把对方的侧面,而不是顶部的项目我做错了?还有另一种方法可以做到吗?我尝试使用DockLayout,但同样的事情正在发生。

+0

没有人有解决方案吗?是不是ngFor为按行排列的布局应该是非常基本的? –

回答

0

我没有你的组件,所以我用div,但这个想法几乎是一样的。

<div fxLayout="row"> <!-- extra container with row layout --> 
    <div class="itemWindow" *ngFor="let imageUrl of matchItems"> 
    <div class="inventoryImage"> 
     <div width= "80" height="80" stretch="aspectFill" 
      left="5">{{imageUrl}}</div> 
    </div> 
    </div> 
</div> 
相关问题