I need to extract the userId of the current signed-in user and pass it as a parameter (foreign Key) to another method called AddExperience. The userId is stored in LocalStorage after logging in!
Here is the action from the service:
AddExperience(UserId: any) { return this.http.post(this.rootUrl + '/AddExperience'+ UserId, {responseType: 'json'}); }
These are the values stored in localStorage:
token-exper: 2122-07-23T01:40:15Z
UserRole: User
ID: 2aa0f755-cf7d-4c62-bfe8-1de35ee01b09
What steps should I take in the AddExperience TypeScript file to associate the Experience with the current User?