Skip to content

AngularJS incompatibility: need to unwrap elements when jqLite.data() is used #363

@louisremi

Description

@louisremi

When using a polymer element in an angular app, I noticed that Batarang is no longer able to report the scope attached to DOM elements. And the angular.element( <node> ).scope() that I wanted to use inside my polymer element to access my model doesn't work either, of course.

After a little bit of research I found that it had to do with the ShadowDOM wrapping, and patching the jqLiteExpandoStore and jqLiteData functions of Angular would solve the issue: I added window.unwrap && ( element = unwrap( element ) ); at the beginning of each of these functions (and jqLiteRemoveData as well).

I haven't been able to find exactly what needs to be changed in Polymer to avoid patching Angular. I hope you guys can help me out.
It might have to do with the expando thingy, which is a randomly named property that links data from a single cache to DOM elements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions