Skip to content

bug: Filter in collection-repeat doesn't work anymore #2735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tchavot opened this issue Dec 16, 2014 · 7 comments
Closed

bug: Filter in collection-repeat doesn't work anymore #2735

tchavot opened this issue Dec 16, 2014 · 7 comments

Comments

@tchavot
Copy link

tchavot commented Dec 16, 2014

Type: bug

Platform: all

Filter in collection-repeat doesn't work anymore after updating to beta 14

@toddhalfpenny
Copy link

Here's a couple of codepens showing the issue. I am finding it's only an issue using Angular's one way bindling. When I don't use the "::" it seems to still work OK.
The issue: (http://codepen.io/toddhalfpenny/pen/dPXpWY)
Working with ng-repeat instead of collection-repeat (http://codepen.io/toddhalfpenny/pen/raLMmP)

@toddhalfpenny
Copy link

So perhaps I'm being silly, I think I have the ng-repeat with one time binding wrong. Perhaps this shouldn't even work.

@toddhalfpenny
Copy link

So I think I was using the wrong syntax for one time binding when using ng-repeat. I should have been using item in ::list as opposed to item in list. This seems to point to filters (as I was using them) being not supported for ng-repeat.

@tchavot As for your original query I seem to have filter in collection-repeat working OK. Please see the codepen here which covers a variety of implementations, some right, some wrong, which also shows the filter investigation results. http://codepen.io/toddhalfpenny/pen/NPrbOQ

@drewrygh
Copy link
Contributor

@tchavot - can you provide any more info and put together a codepen example.

@toddhalfpenny - thanks for putting together that example. It seems this is more of a problem with angular. The responses at angular/8605 may be helpful.

@drewrygh drewrygh added list needs: reply the issue needs a response from the user labels Dec 18, 2014
@toddhalfpenny
Copy link

@drewrygh - Yes, it looks like it is. Thanks for the link.

@tchavot
Copy link
Author

tchavot commented Dec 19, 2014

Just resolved the issue by initializing scope variables used in filter
e.g. $scope.myFilterVariable = '';

@Ionitron Ionitron removed the needs: reply the issue needs a response from the user label Jan 19, 2015
@ajoslin
Copy link
Contributor

ajoslin commented Feb 24, 2015

Works fine for me.

Don't use bindonce with collection repeat. I'll add a note to the docs.

@ajoslin ajoslin closed this as completed Feb 24, 2015
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants