Angular 2 *ngFor - Conditional wrapper element. Like using bootstrap row with three columns inside, then add a new row

后端 未结 5 1267
挽巷
挽巷 2021-01-15 12:00

I am using *ngFor and it has me perplexed. I am trying to use UIkit but it would be applicable to Bootstrap also.

5条回答
  •  悲哀的现实
    2021-01-15 12:23

    @ChristopherMoore have great answer but you need to modifythe devices_triple function to add a statement to check

    if (i == this.devices.length){
       arr.push(triple);
    }
    

    this will help where cases like [[1, 2, 3],[4, 5]] and [[1, 2, 3],[4, 5, 6],[7]]

提交回复
热议问题