Just to let you guys know, I tried this plunker with angular 1.3.10 and 
this technique doesn't appear to work anymore.
However I found a similar way to obtain the same result: 
http://plnkr.co/edit/GdbJUivdgMuWi38V8FDN

Le mardi 14 octobre 2014 02:23:48 UTC+2, Javier Lerones Gallego a écrit :
>
> A little late, but I believe this is the way they meant to do this
> http://plnkr.co/edit/cLLnepeFIPF60NCrivJ1
>
> Just use the controllerAs syntax to bind the name of the directive's 
> controller to a scope property in the parent controller, then you can 
> access all the directive's methods from its parent. Very useful when you 
> need to trigger those methods from controls outside of the directive.
>
> For example let's say you have a calendar directive somewhere in the page, 
> and you want to put month/year navigation buttons somewhere else in your 
> views
>
> I hope this is helpful
> Javier
>
>
> On Tuesday, July 29, 2014 2:37:18 AM UTC-7, David Jensen wrote:
>>
>> Do you have an example of this working that you can share?
>>
>> Thanks.
>>
>> On Monday, June 2, 2014 11:06:33 PM UTC-7, Sander Elias wrote:
>>>
>>> Hi Iain,
>>>
>>> I did this a couple of times. Works like a charm. You can design the 
>>> controller so, that it can serve as an API for your directive.
>>>
>>> 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