Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.

Modals that contain directives that require outer controller fail #3765

@raymMM

Description

@raymMM

Problem: when a modal template contains directives that require an outer controller, this outer controller must be present in the template otherwise it will fail.
I have created a test case here: http://embed.plnkr.co/UN5gqhrdZXHmWbqDA6Xg/preview
Clicking 'Open Popup' opens the modal. Then clicking 'ok' should call a function from a required outer controller. Unfortunately it will not be found.

Reason for failure: the $modalStack.open function compiles the template content directly on the page body.

A solution would be to use a 'futureParentEl' as the parent instead of the html-body, when available.
See: 50a561a

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions