You can create the SessionService class and pass it through the application through Injection Dependency.
After selecting the user, you can attach the relative data to the SessionService instance introduced through the DI and get it in the UserDetails component.
I hope this helps
source
share