Currently this is not really possible in AngularJS.
The best option you have, which is what Brian is suggesting is to expose a configuration object on your directive which the directive watches and reacts it changes. You can pretty much do all you need with this strategy.
Another alternative is for your directive to listen for a specific event on the scope and for your "controlling external object" to broadcast the event down the scope stack to it. This doesn't work so well if you have multiple child directives listening as you may not know which directive should react.
... sent from my tablet
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en.
I would suggest the scope.$on/$broadcast way or using a service with scope.$watch in directive, because it seems to be easily testable and clear for the reader of the code.
Imagine writing expectations in unit tests of your controller. It processes some business logic and eventually sends message to the "outside" world by broadcasting a message or invoking service's method (which you mock).
Regards,
Witold Szczerba
---
Sent from my mobile phone.
--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/htKUVVNhi7A/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/htKUVVNhi7A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/htKUVVNhi7A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.