Hi Witold,

The crux of the example was not solving a color thingie the simplest way 
possible. It is on how to communicate with an directive.
on how an directive can expose some parts of it's functionality to the 
view, or even to a controller. An more real world scenario
would be an tabs directive that exposes some functions to its 
children(usually panes) like addTab, moveTab etc.
perhaps you even need some of the info inside your view somewhere else (for 
example update a breadcrumb to display the active tab...)

For those cases I think this is a very simple and clean way to expose an 
API to the view/scope, and the most 'angular' way. But I would love to hear 
your
opinion on that!

I do agree that for my sample, it is 1000% to complex!

-- 
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/d/optout.

Reply via email to