I have a dotnetcore 20 and angular4 project that I am trying to create a userService and get the user to my home component. The backend works just fine but the service doesn
the accepted answer is correct, just wants to add a newer and shorter answer.
this.currentUser = JSON.parse(localStorage.getItem('currentUser')!);