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

ng-include and sortable element class identifier issue #3

Open
denangeles opened this issue Oct 9, 2014 · 3 comments
Open

ng-include and sortable element class identifier issue #3

denangeles opened this issue Oct 9, 2014 · 3 comments

Comments

@denangeles
Copy link

Hello,

First i would like to thank you for your work on this. Its a great alternative!

This is also my first time raising a issue on a repo that is not mine, so please let me know if i am out of line.

I am building my angularjs application and frequently use ng-include to include templates in other files, but as soon as i use your sortable directive, then in the next level down, your class identifier, ng-repeat, and ng-include the sorting breaks.

I have confirmed that it breaks with simple external templates (i.e just a simple angular curly brace expression), but works perfectly when i do not use ng-include.

Thanks again for your work! Don't expect you to fix this, but thought i should let you know.

@schartier
Copy link
Owner

Thanks denangeles, I really appreciate that you took the time to inform me about this issue.

I don't have time to test it right now, but could you please try to use $parent.[yourmodel].[key] instead of [yourmodel].[key] in your template. I might be an issue related to scope...

Your help is realy appreciated, make this verification and I will fix it either way :)

Sebastien

@CaptainYarb
Copy link

I have the same issue when I use this directive on a routed controller (external view/partial). I think the issue here has something to do with the way you are binding to events. jQuery needs to have a parent element to bind the events. It's likely the events are being removed when the scope is applied/updated.

@schartier
Copy link
Owner

It is fixed now, I just added a included-file.html that I use with ng-include to the repo and it works well inside this example.

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