I am using the same controller in several HTML pages in my project. My problem is that each page links to the other and instead of them all using the same exact controller they duplicate it each time the next page is opened and each page is using its own controller, which means, all the data saved in the previous controller will not apply on the next page with the new duplicated controller.
I recently acknowledged that each controller has its own ID ($scope.$id
), so:
Is there an option for me to request a specific controller to be used on the HTML page based on its controller ID?
Or is there an alternate option to store the variables of the controller in another place where i could use them without being concerned that they will reset on each page?