The context triggered by the request:
Triggered by the following line of code:
loadAddresses(): void {
this.authService.invokeWithUserId((userId) => {
console.log('Jerry auth user and fetch address: ' + userId);
this.store.dispatch(new UserActions.LoadUserAddresses(userId));
});
}
Unsubscribe immediately after subscribe: just to get userId:
At the end of this line of code, manually dispatch an HTTP PUT operation to set the address:
HTTP put操作:
For more original articles by Jerry, please follow the public account "Wang Zixi":