import { Component } from '@angular/core';
import { WrRange } from 'ngwr/pipes';
@Component({ imports: [WrRange] })
export class MyComponent {}wrRange
Turn a count into [0, 1, …, n - 1] to repeat a block with @for.
Installation
Import the class. This entry point has no stylesheet.
Usage
@for (i of (5 | wrRange); track i) {
<li>Item {{ i + 1 }}</li>
}API
| Name | Description | Type | Default |
|---|---|---|---|
wrRange | Returns [0, 1, …, length - 1]. | (length: number) => number[] | — |