Closed rahulasharm closed 5 years ago
there is no parent-child relation between those 2 components, as the overview component is a routed component, so you cant use @ViewChild. I suggest you to either use gitter or go to stackoverflow for support related questions. Here are some examples of what you could do.
Actually, already I am using service(project.service) in routed class component(overview.component). and I want to call routed class method from parents (dashboard-product.component)class components.
how to call overview.component method from dashboard-product.component in Teradata covalent quickstart app
How to call the function of another component in angular 2. I have two parents and child component and I want to call child method from the parent component.
Actually, I am using service from child class component. and I want to call child method from parents class components. and I tried to call from parents using @ViewChild but it gives an error and not working for me.
please help me