Upon logging in, I am able to retrieve the user.
private login() {
let data = { "UserName": "admin" , "Password": "+" };
this.apiService.doLogin(data).subscribe(
(res) => this.userService.set('user', res),
(err) => console.log(err)
)
}
How can I effectively implement this userService? * Is there a way to fetch user data without making a new call to the back end? ** I am aware of https://github.com/ngrx/store, but perhaps there is a better solution out there?