Adding rows with ng-repeat and nested loop

前端 未结 6 923
情书的邮戳
情书的邮戳 2020-12-02 15:25

I\'m looking for a way to add rows to a table. My data structure looks like that:

  rows = [
    { name : \'row1\', subrows : [{ name : \'row1.1\' }, { name          


        
6条回答
  •  时光取名叫无心
    2020-12-02 16:16

    More than one year later but found a workaround, at least for two levels (fathers->sons).
    Just repeat tbody's:

    {{row.name}}
    {{sub.name}}

    As far as I know all browsers support multiple tbody elements inside a table.

提交回复
热议问题