-
Notifications
You must be signed in to change notification settings - Fork 27.4k
feat(ngRepeat): support a new range syntax for integer arrays #5557
Conversation
this looks neat at first sight but I think that there are other ways to achieve the same thing without making ngRepeat syntax more complicated and with it making the implementation also more complicated. Take a look at |
@IgorMinar That looks interesting but feels a little bit weird; official filters we've got so far are either a bijection or a surjection, but the linked solution makes it look like it's creating a range of something out of nowhere. Would look better if it's called something like So to summarize, a generalized filter solution would give us |
what about a solution like this: |
I was able to cut the number of |
A tiny refactor to make the codeflow more fluent by following the order of the expression.
Any way to re-trigger the Travis building process? It failed but it's not my fault 💩
|
@gsklee just do |
Provide a built-in `$range(_from_, _to_)` function as a shorthand method to quickly iterate over an array of integers. Closes angular#3861 Closes angular#5268 Closes angular#5557
@matsko that worked - thanks 😸 |
02dc2aa
to
fd2d6c0
Compare
cad9560
to
f294244
Compare
e8dc429
to
e83fab9
Compare
4dd5a20
to
998c61c
Compare
Provide a range syntax [from..to] as a shorthand when iterating over an array of integers.
Closes #3861
Closes #5268
The refactoring commit has been wrapped independently as a separate PR (#5556).