I am using *ngFor and it has me perplexed. I am trying to use UIkit but it would be applicable to Bootstrap also.
*ngFor
@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]]