I have a doubt and it is that I want to print an element in the ionic view a number of times according to a numerical variable
Let's say :
public numero = 4;
then in the view try to do a kind of cycle with *ngFor
but without results (because I usually use it with Arrays)
Then I did some research and read about ngrepeat
I want to print a star according to the number I sent him, that is, if he sent him a four, print four stars
<ion-icon ng-repeat="i in numero" color="yellow" ios="ios-star" md="md-star" ></ion-icon>
try this, it should work Html:
in controller
I put a link where they explain it better: https://stackoverflow.com/questions/16824853/way-to-ng-repeat-defined-number-of-times-instead-of-repeating-over-array