Prasenjit Dutta
08/16/2024, 11:24 AMLee Turner
08/16/2024, 12:37 PMrange
helper. There might be a better way to do this but off the top of my head, the math
helper seems to work - math request.query.friends '+' 0
You can then use it with the each
and `range`:
{ [
{{#each (range 1 (math request.query.friends '+' 0)) as |friend|}}
{{friend}},
{{/each}}
] }
With a request like this - /friends?friends=5
you should get this:
{ [
1,
2,
3,
4,
5,
] }
Prasenjit Dutta
08/16/2024, 12:47 PM