I am using *ngFor and it has me perplexed. I am trying to use UIkit but it would be applicable to Bootstrap also.
As the other answer proposed, storing the index with something like *ngFor="let device of devices ; let i = index" will let you keep track of the index in the collection you're iterating over.
Then, as far as I understand you need correctly, you want to conditionally apply a class to elements, namely the first and every third. If you actually want a series like T,F,F,T,F,F,T,F,F,T,... then you can use i % 3 === 0 to produce it and apply a class conditionally with something like
This will let you conditionally add a class to the first and every third element afterwards. If instead you want to have different html based on the index, then you have to use ngIf branching and have two html snippets to handle the two cases. Something in the lines of: