We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50a9814 commit 59d3423Copy full SHA for 59d3423
libs/angular-three/src/lib/directives/repeat.ts
@@ -0,0 +1,9 @@
1
+import { NgForOf } from '@angular/common';
2
+import { Directive, Input } from '@angular/core';
3
+
4
+@Directive({ selector: '[ngFor][ngForRepeat]', standalone: true })
5
+export class NgtRepeat extends NgForOf<number> {
6
+ @Input() set ngForRepeat(count: number) {
7
+ this.ngForOf = Number.isInteger(count) ? Array.from({ length: count }, (_, i) => i) : [];
8
+ }
9
+}
0 commit comments