🔁 A simple Angular directive to repeat an element.
npm install ng-for-repeat
Add NgForRepeatModule
to your module imports :
import { NgForRepeatModule } from 'ng-for-repeat';
@NgModule({
...
imports: [NgForRepeatModule],
})
export class AppModule {}
<div *ngForRepeat="3">
...
</div>
or
<div *ngFor="let x repeat 3">
...
</div>