Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • I am getting the data in another component ts as I am passing the required data as an argument. I can see that in console also by printing it. But is not reflecting only in view Commented Feb 27, 2018 at 12:46
  • Would you kindly share your component definitions including the templates Commented Feb 27, 2018 at 12:53
  • So you are injecting a component into another component. I doubt they are the same instance. Would you put a console.log in the AppHeaderComponent and see how many times it is getting called. From a parent container, you can get the reference to your app-header-component using @ViewChild(AppHeaderComponent). I would still suggest to use a service, which is a singleton and all the components would get the same service instance. Commented Feb 27, 2018 at 15:55