NGX Repeat Times
![LinkedIn](https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555)
Ngx Repeat Times
Steal this elegant trick right now to repeat templates without聽*ngFor
When you need to repeat templates based on a number rather than a collection or iterable like this:
<div *repeatTimes="length; index as i">
{{ i }} This will render {{ length }} times
</div>
Installation
npm install ngx-repeat-times
Add the NgxRepeatTimesModule
to the imports
array of the NgModule
decorator
import { NgxRepeatTimesModule } from "ngx-repeat-times";
@NgModule({
//...
imports: [
//...
NgxRepeatTimesModule,
//...
],
//...
})
export class ExampleModule {}
Usage
<!-- some.component.html -->
<div *repeatTimes="length; index as i">
{{ i }} This will render {{ length }} times
</div>
<!-- or -->
<div *repeat="let index times length;">
{{ index }} This will render {{ length }} times
</div>
View Source
路
Report Bug
路
Request Feature
馃殌 聽 Declarative 路
馃帀 聽 Very Simple to use 路
馃嵒 聽 No Need to Hacking NgFor 路
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
)
- Commit your Changes (
git commit -m 'Add some AmazingFeature'
)
- Push to the Branch (
git push origin feature/AmazingFeature
)
- Open a Pull Request
(back to top)
License
Distributed under the MIT License. See LICENSE.md
for more information.
(back to top)
Contact
Nivrith - @_Nivrith_ - nivrithgomatam@gmail.com
Project Link: https://github.com/nivrith/ngx-repeat-times
(back to top)