ngx-repeat
v5.0.2
Published
Angular directive for repeating HTML element by count
Downloads
517
Readme
Angular directive for repeating HTML element by count
✓ Angular 22 compatible
Here's the demo or stackblitz live preview or codesandbox live preview
- Lightweight
- No dependencies!
- Directive way
🛠️ Install
- Use Bun to install the package
bun add ngx-repeat- Add NgxRepeatDirective into your component`
import { NgxRepeatDirective } from 'ngx-repeat';
@Component({
standalone: true,
imports: [NgxRepeatDirective /*, ...*/],
// ...
})or module
import { NgxRepeatDirective } from 'ngx-repeat';
@NgModule({
// ...
imports: [
// ...
NgxRepeatDirective
]
})🚀 Quick start
Example code
<div
*ngxRepeat="3;
let index = index;
let even = even;
let odd = odd;
let first = first;
let last = last;"
>
{{ index }} {{ even }} {{ odd }} {{ first }} {{ last }}
</div>Result
0 true false true false
1 false true false false
2 true false false true🔧 Compatibility
| Angular | ngx-repeat | Install |
| --------- | ---------- | ---------------------- |
| >= 22 | 5.x | bun add ngx-repeat |
| >= 20 | 4.x | bun add ngx-repeat@4 |
| >= 19 | 3.x | bun add ngx-repeat@3 |
| >= 14 | 2.x | bun add ngx-repeat@2 |
| >= 12 | 1.x | bun add ngx-repeat@1 |
| >= 5 < 13 | 0.x | bun add ngx-repeat@0 |
📦 Dependencies
None
🪪 License
Copyright © 2021 - 2026 Dominik Hladik
All contents are licensed under the MIT license.
