Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

angular.element.scope() returns undefined #9515

Closed
@marosivanco

Description

@marosivanco

angular.element.scope() is undefined when the application is loaded in iframe by changing the iframe src attribute.

The following code should return reference to scope but returns undefined:

angular.element(document.body).scope()

The code above is executed in the onclick handler after the document is loaded and angular has finished bootstrap:

<script>
    document.addEventListener("click", function(){
        console.log(angular.element(document.body).scope());
    });
</script>

The issue manifests itself only when the document is loaded in the iframe by modifying its src attribute.
Tested with 1.3.0-rc.5, without jquery.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions