My current method for displaying a certain number of *
characters is utilizing the code snippet below:
<div *ngFor="let line of lines; let i=index">*</div>
I am interested in applying a margin only to the first element. The margin value should be linked to a variable called marginVar
within the corresponding .ts
file.
While I know how to set margin for all elements, as shown here:
[style.margin-left.px]="marginVar"
I am unsure on how to selectively apply this margin to just the first element created with *ngFor
.