Last active
November 1, 2018 00:28
-
-
Save facelordgists/c34cdf05a3664c52c400e8c27cea358e to your computer and use it in GitHub Desktop.
This example repeats the row every 3 products. See: https://stackoverflow.com/questions/27211799/angular-ng-repeat-add-bootstrap-row-every-3-or-4-cols#answer-38857761 #angular #js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.row.row-eq-height(ng-repeat='product in productsFiltered=(products | filter:{name: filterQuery} | orderBy: sortTerm)' ng-if='$index % 3 == 0') | |
.col-xs-4(ng-repeat='i in [0, 1, 2]', ng-init='product = productsFiltered[$parent.$parent.$index + i]', ng-if='$parent.$index + i < productsFiltered.length') | |
.panel.b.product-list-block.mb-sm | |
.panel-heading | |
span.product-type-icon | |
div {{product.name}} | |
table.product-list-block-table.mt-lg.mb-lg | |
tbody | |
tr | |
th Price | |
th Sub Products | |
tr | |
td ${{product.monthly_price}} | |
td {{ product.children.length || "N/A"}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment