ngFor create 2 rows

前端 未结 2 956
悲&欢浪女
悲&欢浪女 2020-12-10 23:50

Using Angular 2 ngFor I\'m creating a table.

My problem is that my data array contains elements such that each element should create 2

2条回答
  •  不思量自难忘°
    2020-12-11 00:34

    I faced it the same problem and i didn't find any good solution. But after a deep reseach i found this ng-container and it worked very well. U can see it in action bellow

    https://plnkr.co/edit/F8ohXKLHvvbHXAqGESQN?p=preview

     
            
                
                    
                 
              {{obj.date}}
              
                  {{obj.subject}}
              
              {{obj.numComents}}
            
            
                
                
                    
    Comment
    {{q}}

提交回复
热议问题