Incorrect work of Angular and Bootstrap: columns stretched only by the size of the content

Advertisements <div class="row"> <div *ngFor="let column of columns"> <div class="col"> <div *ngFor="let cell of column"> …cellcontent… </div> </div> </div> </div> Here columns is a matrix (object[ ][ ]). I expect the columns to be the same and span the full width of the row, which is how bootstrap usually works. That is, the columns are… Read More Incorrect work of Angular and Bootstrap: columns stretched only by the size of the content

ngStyle only on specific condition

Advertisements <h4 *ngFor="let x of textAddedList" [ngStyle]="{backgroundColor:textAddedList.length>2?’grey’:’transparent’}">{{x}}</h4> I want to apply the grey styling only after the 2 entery, but when I applying this logic it apply to all. instead after 2nd line. Thanks in advance. >Solution : Work with index in *ngFor. As the index of array starts with 0, for the rows after… Read More ngStyle only on specific condition

How can I vertically center an icon in an input?

Advertisements I don’t know how to center an icon vertically inside an input. This is my code: <i-feather name="user" class="fea icon-sm icons"></i-feather> <input type="text" class="form-control ps-5" placeholder="Name" name="s" required=""> Currently it looks like this: and I want to achieve an effect like this: How do I center the icon vertically in the input? >Solution :… Read More How can I vertically center an icon in an input?