Hi Sumair,

I would use a message bus for things like this. 

@Injectable({
providedIn: 'root'
})
export class MsgBusSerrvice {
private messages = new ReplaySubject<MsgBusMessage>(1);
private messages$ = this.messages.asObservable();

emit = (m: MsgBusMessage) => {
this.messages.next(m);
};

ListenForAllMessages = (): Observable<MsgBusMessage> => {
return this.messages$;
};
}

A more usable version can be found in my sample repo 
<https://github.com/SanderElias/Samples/blob/master/src/app/generic-services/msgBus.service.ts>
Using such a service that you can inject anywhere makes it easier to cross 
boundaries between modules and pars.

Aside from that, do you have a reproduction from your issue available, so I 
can dig in and see what's actually causing your issue? On first sight I 
would say it should work, but not 100% sure it can.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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