Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overlay Can't Access ControllerAs Scope #13

Open
jaxspades opened this issue Jun 3, 2015 · 1 comment
Open

Overlay Can't Access ControllerAs Scope #13

jaxspades opened this issue Jun 3, 2015 · 1 comment

Comments

@jaxspades
Copy link

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.

@richarddavenport
Copy link

I second this. I'm glad someone brought this issue up, probably saved me from banging my head on the wall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants