So, I know there is the *ngFor
to loop several times, but this loop only works with an array. Is there a way of doing this loop with number?
I'd like to:
<a href="#">1</a>
<a href="#">2</a>
<a href="#">3</a>
<a href="#">4</a>
<a href="#">5</a>
Like this:
<a href="#" *ngFor = "let pagina of paginas">{{pagina}}</a>
But I'd like to pass a number to paginas
, instead of an array.
In PHP would be something like this:
for($i = 1; $i <= 5; $i++) {
...
}