https://github.com/Celtian/ngx-repeat
  
  
    Angular directive for repeating HTML element by count 
    https://github.com/Celtian/ngx-repeat
  
angular library
        Last synced: 6 months ago 
        JSON representation
    
Angular directive for repeating HTML element by count
- Host: GitHub
- URL: https://github.com/Celtian/ngx-repeat
- Owner: Celtian
- License: mit
- Created: 2021-02-16T21:51:49.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-04-13T21:50:17.000Z (7 months ago)
- Last Synced: 2025-05-04T16:02:28.150Z (6 months ago)
- Topics: angular, library
- Language: TypeScript
- Homepage: https://celtian.github.io/ngx-repeat
- Size: 2.72 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
- 
            Metadata Files:
            - Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
 
Awesome Lists containing this project
- awesome-angular - ngx-repeat - Angular directive for repeating HTML element by count. (Third Party Components / Directives)
- fucking-awesome-angular - ngx-repeat - Angular directive for repeating HTML element by count. (Third Party Components / Directives)
README
          NgxRepeat
[](https://badge.fury.io/js/ngx-repeat)
[](https://www.npmjs.com/ngx-repeat)
[](https://www.npmjs.com/ngx-repeat)
[](https://snyk.io/advisor/npm-package/ngx-repeat)
[](https://codecov.io/gh/celtian/ngx-repeat/)
[](https://github.com/celtian/ngx-repeat/)
[](https://github.com/celtian/ngx-repeat/)
[](http://hits.dwyl.com/celtian/ngx-repeat)
> Angular directive for repeating HTML element by count
> ✓ _Angular 19 compatible_
Here's the [demo](http://celtian.github.io/ngx-repeat/) or [stackblitz live preview](https://stackblitz.com/edit/ngx-repeat) or [codesandbox live preview](https://codesandbox.io/s/ngx-repeat-bew8f)
- Lightweight
- No dependencies!
- Directive way
## 🛠️ Install
1. Use yarn (or npm) to install the package
```terminal
yarn add ngx-repeat
```
2. Add NgxRepeatDirective into your component`
```typescript
import { NgxRepeatDirective } from 'ngx-repeat';
@Component({
  standalone: true,
  imports: [NgxRepeatDirective /*, ...*/],
   // ...
})
```
or module
```typescript
import { NgxRepeatDirective } from 'ngx-repeat';
@NgModule({
 // ...
 imports: [
   // ...
   NgxRepeatDirective
 ]
})
```
## 🚀 Quick start
### Example code
```html
  {{ index }} {{ even }} {{ odd }} {{ first }} {{ last }}
```
### Result
```code
  0 true false true false
  1 false true false false
  2 true false false true
```
## 🔧 Compatibility
| Angular   | ngx-repeat | Install                 |
| --------- | ---------- | ----------------------- |
| >= 19     | 3.x        | `yarn add ngx-repeat`   |
| >= 14     | 2.x        | `yarn add ngx-repeat@2` |
| >= 12     | 1.x        | `yarn add ngx-repeat@1` |
| >= 5 < 13 | 0.x        | `yarn add ngx-repeat@0` |
## 📦 Dependencies
_None_
## 🪪 License
Copyright © 2021 - 2025 [Dominik Hladik](https://github.com/Celtian)
All contents are licensed under the [MIT license].
[mit license]: LICENSE