Angular ng-repeat in table,添加额外的行

Angular ng-repeat in table, adding extra rows

我正在使用 ng-repeat 和 Angular 重复数组的内容。之后,但在同一个 table 中,我想添加一些带有信息的额外行。但是因为它在 ng-repeat 中,我在 {{getCartTotal()}} 上收到 angular 错误,现在称为无限次。

有没有办法停止 ng-repeat,或者有其他方法可以在同一元素中的 ng-repeat 之后添加额外的行?

这是我的代码(在 Jade 中)。只有第一个 tr 必须重复。

table.shop_table.woocommerce-checkout-review-order-table
   tbody
       tr(ng-repeat='product in shoppingCart')
          th 
             {{product.name}}
             span.count  x {{product.quantity}}
             td
                span.amount € {{product.price * product.quantity | number:2}}
       tr.cart-subtotal(ng-repeat-end)
         th Subtotaal
           td
             span.amount € {{getCartTotal()}}}
       tr.shipping
         th Verzendkosten
           td
            span 
              i 
                | Tijdelijk gratis!
        tr.order-total
          th
            strong Totaal
               td
                strong
                   span.amount € {{getCartTotal())}}

从评论中复制。

ng-repeat-endng-repeat-start 一起使用,也会重复出现。尝试删除 ng-repeat-end

tr(ng-repeat='product in shoppingCart')
    th 
        {{product.name}}
        span.count  x {{product.quantity}}
        td
          span.amount € {{product.price * product.quantity | number:2}}
tr.cart-subtotal
    th Subtotaal
        td
            span.amount € {{getCartTotal()}}