I'm facing some confusion regarding creating a global variable that can be accessed in another file. Currently, I have a chat and login folder setup. Within the login folder, there are three possible users to choose from. When a user clicks on one of these options, I want the chat app to recognize which user it is by storing this information in a variable and passing it to the chat folder. However, I am unsure of how to do this. Any assistance would be greatly appreciated. I am using AngularJS for this project.
Here is the Login Page:
This page is separate from the main folder. After the user submits their selection, they will be redirected to the chat folder using AngularJS. The challenge lies in capturing and passing on the user's identity so that when chatting, the system knows who is involved in the conversation.