Skip to content

Overlay Can't Access ControllerAs Scope #13

@jaxspades

Description

@jaxspades

Right now, the overlay element accesses properties from the scope that is passed to it, based on the name of the property in ng-morph-overlay. The unfortunate part is that any sort of controllerAs syntax, like ctrl.settings, can't be accessed on that scope. It's typically further up in the scope.

So, if you have ng-morph-overlay="ctrl.settings", it won't be able to access the controller's scope and the related settings, as they do not live on the overlay's scope.

This should support both an alias scoped through controllerAs and a non-aliased scope.

For example, this could have something like:

ng-morph-overlay overlay-settings="ctrl.settings"

This would allow for either type of scope, as it would rely on Angular's setup for a directive's isolate scope, rather than directly accessing the property on the scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions