Not sure what you did, show us your code

On Tuesday, February 23, 2016 at 7:50:50 AM UTC+11, JG wrote:
>
> I have a parent Component that has a template with "
> <router-outlet></router-outlet>" in it. It also has a @RouteConfig 
> annotation that specifies which sub component is associated with different 
> routs.
> What I am trying to do is: to subscribe to Events (EventEmitter) that are 
> fired by the loaded sub component.
>
> I can easily inject the sub component into my parent component and 
> subscribe to it's EventEmitter, but that doesn't work. I think that the 
> problem is that the injected instance is not the same the one that emits 
> the events.
>
> So, my question is: if a component has @RouteConfig([ {path: "/somePath", 
> component: ChildComponent, as: "ChildCmp"}]), how can I get a reference 
> to ChildComponent to subscribe to it's event?
>

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

Reply via email to