We've tried exposing the directive's controller as the API.  It's made me 
uncomfortable for a couple of reasons: 1) There are often a number of 
methods on the directive's controller that are only used by the directive 
itself and we don't want those available to the outside world and 2) when 
you see a directive in a template, you have to go look up the directive 
source to understand what the API is.  

On Saturday, March 28, 2015 at 12:38:15 AM UTC-5, Sander Elias wrote:
>
> Hi John,
>
> This is discussed in this group before. There are more solutions, but in 
> my eyes, exposing the directives controller to the scope, via controllerAs 
> has the cleanest interface. Just a few days ago I did adapt a small sample 
> <http://plnkr.co/edit/2UOHexn1kPkKO0ikm8Ni?p=preview> for another 
> question.
> If you want/need more information about this, just ask!
>
> Regards
> Sander
> ​
>

-- 
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