Skip to content
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

Using {{$index}} id's for ng-repeat #8

Open
eadolf opened this issue Feb 1, 2015 · 4 comments
Open

Using {{$index}} id's for ng-repeat #8

eadolf opened this issue Feb 1, 2015 · 4 comments

Comments

@eadolf
Copy link

eadolf commented Feb 1, 2015

I have filtered-grouped-lists that are using ng-repeat. id="itemGroup{{$index}}" works and gives each group an id of #itemGroup0, #itemGroup1 etc. But when I try to use scroll-body="'#itemGroup{{$index}}'" this doesn't work. Is this the correct syntax at this level? Any clarification or help would be greatly appreciated.
Thanks!

@keithnlarsen
Copy link
Contributor

Could you post an example for me on http://jsfiddle.net/

I can try to help you if you give an example of what you are doing.

@eadolf
Copy link
Author

eadolf commented Feb 10, 2015

Here you go http://plnkr.co/edit/XRcjxB?p=preview
I have $index on the ID and on the scroll-body ID and it renders correctly. But the directive doesn't see it?
Without using {{$index}} with my id it works, but all labels are grouped as one.

This is the last piece I need to work for this test. Any help would be greatly appreciated.

@eadolf
Copy link
Author

eadolf commented Feb 10, 2015

I tried to incorporate this http://www.nodewiz.biz/angular-js-final-callback-after-ng-repeat/ so that your code would only fire after the ng-repeat was done, but it's not working. I'm new to angular, so I'm being really hacky about this at the moment.

@kylebradshaw
Copy link

I'm currently hitting this too, did you find a viable solution that let you pass the $index in the scroll-body?

keithnlarsen added a commit that referenced this issue Apr 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants