Yup, that worked a charm. Makes sense. I just added a new directive thusly:
.directive 'flowSpy', ->
restrict: 'A'
scope: true
require: '^mediaUpload'
link: (scope, element, attrs, mu)->
scope.$on 'flow::filesSubmitted', (ev, flow, flowFiles)->
mu.filesSubmitted flowFiles
which I then just had to stick in an element inside the flow-init
(third-party) element.
On Tue, Sep 16, 2014 at 3:09 PM, Eric Eslinger <[email protected]>
wrote:
> That makes a lot of sense. I bet I could even just require the grandparent
> controller in that proxy directive and hand events up directly by calling
> the relevant methods on the gp controller.
>
> e
>
> On Tue, Sep 16, 2014 at 11:47 AM, Sander Elias <[email protected]>
> wrote:
>
>> Hi Eric,
>>
>> Ah, I see. Well, you can create a proxy directive that echoes the event
>> back upwards.
>> put a directive somewhere inside the ngFlow scope. Do something like this
>> in the
>> controller (or even in the link function if you prefer that)
>>
>> scope.on('ngFlowEvent', function (ev,args) {
>> scope.emit('myOwnFlowEventNameToPreventClashes',args);
>> });
>>
>> Does that make sense to you?
>>
>> 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.
>>
>
>
--
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.