Hi @Chris and @David.

I did this code a long time ago 
(https://groups.google.com/d/msg/angular/htKUVVNhi7A/mehPM_zaQhMJ).

So, you can check a very simple way to deal with it 
here: http://jsfiddle.net/Fb49w/1/

Cheers,
Daniel.


On Wednesday, July 30, 2014 4:01:32 PM UTC-3, Christian Maniewski wrote:
>
> That is a really great idea! As stated by others already it'd be nice if 
> you shared an example with us :)
>
> Thank you very much.
>
> Chris
>
> Am Dienstag, 3. Juni 2014 02:53:30 UTC+2 schrieb Iain Duncan:
>>
>> I could be off base here, but another approach is to use the "controller 
>> as" option in your directive and save what you want accessed in the 
>> directive as attributes of "this" in the controller instead of on scope. 
>>
>> Would be interested in hearing from others more experienced in Angular if 
>> there is a reason not to do the above too.
>>
>> Iain
>>
>> On Wednesday, October 31, 2012 1:54:17 PM UTC-7, Olivier Clément wrote:
>>>
>>> Hi all,  I have a newb question here;
>>>
>>> Let's say I have a Directive in which I define a few functions that will 
>>> affect its behavior/presentation,
>>> but I want to be able to call these functions from outside the directive 
>>> (the page's controller for instance);
>>>
>>> What would be the best approach? 
>>>
>>> Thanks
>>>
>>>

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