rating = 4; for(i=0; i < rating ; i++){ //print statement }
how to replicate the same for loop with conditions in angular 6 using *ngFor
th
I think you looking for this kind of solution, Just create one empty array with your rating length
component
let items = []; for(i=0; i < rating ; i++){ items.push(i); }
Use in template like