javascript - Create dynamic html rows using angular 5
问题描述
I'm very new to Angular, but I have a bit of java background. I'm trying to place every 4 divs in a new row, but all the divs are appending in the same row. The below one is my HTML code. How can I achieve the same through angular? The below code contains 1 row. I have to repeat the same for each row.
<div class="row startRow">
<div class="col-md-2 hidden-lg"> </div>
<div class="col-lg-3 col-md-2 shop-list" *ngFor="let shop of shops" (click)="onClick(shop.shopId)">
<i class="material-icons UnSelectedImage">check_circle</i>
<img src="{{shop.brandingImage}}" alt="{{shop.name}}" class="img-responsive orgImage" />div 1
</div>
<div class="col-lg-3 col-md-2 shop-list"> div 2</div>
<div class="col-lg-3 col-md-2 shop-list">div 3</div>
<div class="col-lg-3 col-md-2 shop-list">div 4</div>
<div class="col-md-2 hidden-lg"> </div>
</div>
解决方案
推荐阅读
- batch-file - 如果不存在,则获取以太网的 IP 地址,然后使用批处理脚本获取 WIFI 适配器的 IP 地址
- python - SimpleITK:应用逆变换
- restfb - Facebook API 空异常
- python - 熊猫的左合并:结果表有更多行,防止重复
- sas - 如何从 SAS 中的数据集创建集群?我对解决方案的尝试如下;
- angular - NativeScript 如何将数据从服务传递到组件?
- excel - Python Openpyxl sheet.dimensions
- c# - peta poco .net 分页查询添加的“PETA_PAGED”附近的语法不正确
- mongodb - count() 和 find() 结果不一样
- php - WooCommerce - 在单个产品页面模板上显示产品类别图像