How to get value from one component to another component.
Hey I'm new to Angular but great with DOTnet.As we make SESSION in the ASP.net and that SESSION we can fetch at every page, similarly is there any things thru which we can retrieve value on page.
eg. Like LOGIN page, the person ID who logged we can get it any page.
You could use either input properties, or a service to manage the application state. A single service maybe good if your app is really small, but if your app gets larger you may want look into ngrx. That is an implementation of Redux for Angular, really well done and it integrates very well with Angular.
I wrote a little example of the first approach here:
How to get value from one component to another component.
Hey I'm new to Angular but great with DOTnet.As we make SESSION in the ASP.net and that SESSION we can fetch at every page, similarly is there any things thru which we can retrieve value on page.
eg. Like LOGIN page, the person ID who logged we can get it any page.
tags: Angular
You could use either input properties, or a service to manage the application state. A single service maybe good if your app is really small, but if your app gets larger you may want look into ngrx. That is an implementation of Redux for Angular, really well done and it integrates very well with Angular.
I wrote a little example of the first approach here:
Also, I wrote an opinionated style guide about ngrx: