Hi James, I have another use case for the directive. In my case, it is not a dice UI but a Google Map. The problem is I want the directive to support multiple map APIs from several providers (Google, Yandex, Baidu...) while exposing several extension points.
I have been thinking of $scope.$broadcast, $emit and $on so far. It's the most flexible and powerful approach I can think of so far. Extremely loose-coupling!!! Kind regards, On Wednesday, July 3, 2013 9:50:55 PM UTC+7, James Cook wrote: > > Assume I have a directive which displays an animation of a dice rolling. > And I have several of the dice components on a page. The roll of the dice > isn't random. I want to trigger the animation by passing the dice > component a value to display. > > What is the best practice for triggering a directive from a controller > which may not be in the hierarchy of the dice directives? > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/groups/opt_out.
