Problems with ng-repeat and custom directive in the same element when using jQuery
Dear angular guys,
Overview of the issue: After including jQuery, the scope arg and element.scope() is different in link function when using ng-repeat and custom directive in the same element.
Angular Version(s): 1.1.0, 1.2.0, 1.2.17.
Browsers and Operating System: Tested on chrome, mac os.
Reproduce the error: plunker here
Any ideas?
I believe this is the issue with comment nodes not being able to have data associated with them in jquery, off the top of my head. However, the directive link functions are still called with the correct scopes, so it's not broken in that sense.
Also note that angular 1.2.x does not support jQuery 2.0 --- this problem is not reproducible in angular 1.3
http://plnkr.co/edit/4K8yIqUvji41L87EZunT?p=preview working as expected with supported jQuery 1.10.2
Thanks @caitp. you are right -- it's caused by jQuery2.0 with angular 1.2.x. BTW, I have to use jQuery 2.0.x to support other jQuery-related lib, so which angular 1.3 version do you suggest ?
probably rc2 at this point
@caitp Cool, thanks!