Issue
I am trying to communicate to my parent controller that a new item have been added in its child component. I am aware that for this I have to use @Output and event emitters, and I am using them, but it doesn't seem to be working. Is there another way to accomplish this?
Solution
Yes, there is. You can create a "service" and have a multi-cast observable / subject (e.g. BehavioralSubject<>) push new values.
Here's a good starting point (btw, check out the other methods, too):
Parent and children communicate via a service
Answered By - G. Stoynev
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.