Closed jviotti closed 10 years ago
There's rarely ever a good reason to expose an element to a controller. What's your use case?
I'm working in an Hybrid mobile application. The modal shows a picture that has just been taken from the camera.
We have a set of "element decorators" services that add some capabilities to a surface, eg: an annotation decorator that adds annotation support with floating notes, etc.
These decorators take an element on instantiation, however I'm not able to easily expose the modal element to the decorator.
I could do a whole query for the element but I'm looking forward for a cleaner solution.
Write a directive that uses these services. Use the directive in the modal's template.
Sounds like a good solution. Thanks for the support.
I'm looking forward to access the template element from the controller:
Is this currently possible somehow (from $element or the modal service, etc)?