Not sure if this is best practices or not, but if I attach the API to the
injected ElementRef I can get it to work:
inside my data-service directive, I attach the exposed api I want to use:
element.nativeElement.data = function() {
console.log("HIT");
}
mike
On Friday, July 1, 2016 at 12:06:31 PM UTC-5, mike wrote:
>
> thanks.. So what would I need to do to make this work?
> mike
>
>
> On Friday, July 1, 2016 at 11:55:46 AM UTC-5, Sander Elias wrote:
>>
>> Hi Mike,
>>
>> Ah, now I see your problem. Your #xxx returns a reference to the element,
>> not to the attached controller. (with hindsight, I could have known this
>> without a plunker, sorry about that!)
>>
>> 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.