In my project, I am facing an issue where multiple HTML pages are linking to each other and duplicating the same controller each time a new page is opened. This results in each page using its own controller, causing data saved in the previous controller to not apply on the next page with the new duplicated controller.
Upon realizing that each controller has its own ID ($scope.$id
), I have a couple of questions:
Is there a way for me to specify which controller should be used on an HTML page based on its controller ID?
Alternatively, is there a different method to store controller variables in a separate location so they do not reset on each page?