Reputation: 2023
I have time interval from 00 to 12 hours. I want to display a combo box option such as 00,01,02...12. How can I use ngFor in this case. There is no array or object declared. till index 12 I need to loop.
Upvotes: 0
Views: 532
Reputation: 657666
*ngFor="let hour of hours"
hours = ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'];
Upvotes: 2