did you check this one http://stackoverflow.com/questions/36095496/angular-2-how-to-write-a-for-loop-not-a-foreach-loop ?
– angularrocks.comApr 14 '17 at 08:29
Create pipe which will do all stuff: @Pipe({ name: 'range' })
export class RangePipe implements PipeTransform {
transform(value: number, exponent: string): Array {
if (!value || value <= 0) {
return new Array();
}
return (new Array(value)).fill(1);
}
}
– sQerApr 14 '17 at 13:09