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

dynamic $index binding in dropdownSelector #38

Closed
zhenmin-peng opened this issue Jan 27, 2014 · 4 comments
Closed

dynamic $index binding in dropdownSelector #38

zhenmin-peng opened this issue Jan 27, 2014 · 4 comments

Comments

@zhenmin-peng
Copy link

Great work! Really love this angular-powered datetimepicker.

When I was trying to create a bunch of datetimepickers within a ng-repeat loop, the dropdownSelector refused to inject $index into the configuration string: dropdownSelector: '#Id{{$index}}'.

So how can I make it happen? Really appreciate your help on this.

Cheers.

@dalelotts
Copy link
Owner

Can you please setup a JSFiddle or Plunker that demonstrates your problem?

I suspect that this is because $index is not yet resolved when the configuration is read. If I have a fiddle or plunker I can play around and find a possible solution for you.

@zhenmin-peng
Copy link
Author

Thank you for reply. Here is a fiddle (http://jsfiddle.net/alphaeleven/H6R92/1/) which shows the codes i use in my app.

It works perfectly in the fiddle: $index can be injected dynamically. However, in my app it seems $index is not resolved.

@dalelotts
Copy link
Owner

Yeah, I don't see a problem with the fiddle.

Any luck with your own code?

@scotteza
Copy link

scotteza commented Apr 7, 2015

@alphaeleven I hope you got this to work! I am new to Angular and your questions actually helped me to solve my problem (as I didn't know about $index in an ng-repeat), so thank you - in a roundabout way :)

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