Mandar Shinde

Mandar Shinde

  • NA
  • 423
  • 115.6k

Regarding getting retain values in between two components.

May 21 2019 1:58 AM
Dear All, 
I have created one component with name Global.ts in Angular 6. I have some variables like LoginUserID and its related some information. I have set data to these variables in my navbar component. What I want is this data which is set in navbar component, should get access in all remaining component.
I am not able to get this data in multiple component because it gets vanished if I am trying to access it from other component.
How can I retain data in between multiple components.
Any sugestions will be acceptable. 
Thanking you in advanced.

Answers (3)