-
Notifications
You must be signed in to change notification settings - Fork 27.4k
ng-repeat should accept strings #8870
Comments
that markup doesn't really make any sense --- what do you want to repeat over? |
@caitp: I believe they just want to create |
That doesn't really make any sense, and would not end up doing what they want it to do. It sounds like another "make life easier" pill but would end up not being all that useful because you still wouldn't be specifying a range to iterate over |
I think it does make sense, but for very specific and limited cases. |
it does look a lot like #8210 |
@lgalfaso the range operator is a better idea because it's more explicit about what you want. I don't think implicitly walking for each number between 0 and the target number is intuitive or useful to pretty much anyone, including this very use case. That is not how I would implement a pagination control |
I'm with @lgalfaso and @caitp - this is a perfect use-case for the range operator - which btw I would love to have in AngularJS. @ilanbiala do you have other use-cases on your mind that could not be solved with the range operator proposal from @lgalfaso ? If not I would suggest that we focus on proper implementation of the mentioned range. |
@pkozlowski-opensource I think that the range operator would solve this and a couple other use cases. I'm all for implementing that, because it seems to do some other nice things as well. :) |
How about a E.g. something like this:
|
Closing this in favor of #8210. |
If I have a blog and a pagination widget at the bottom, I get a response from the server like this:
It would be very simple to do something like this:
I can't really think of a better way to handle a situation like this where I know how many
ng-repeat
iterations have to happen, and the data can be used from the data provided byng-repeat
itself. If there is a better solution, I'm all for it, but I thinkng-repeat
offers simplicity and ease of use.The text was updated successfully, but these errors were encountered: