Skip to content

jornetsimon/ng-for-repeat

Repository files navigation

ng-for-repeat

Licence NPM Size Last commit

🔁 A simple Angular directive to repeat an element.

Installation

npm install ng-for-repeat

Add NgForRepeatModule to your module imports :

import { NgForRepeatModule } from 'ng-for-repeat';

@NgModule({
    ...
    imports: [NgForRepeatModule],
})
export class AppModule {}

Usage

<div *ngForRepeat="3">
...
</div>

or

<div *ngFor="let x repeat 3">
...
</div>