How to maintain global variables in KnockoutJs throughout the application?
<p>I have a container page Index.html(this can be treated as a master page) in which I load different pages Home.html, people.html and each page is having its own viewmodel js file (Home.js, people.js). I navigate from Home.html to People.html. In Home.js I make an Ajax call and I need the data it fetches in People.js when I go to People.html page. I have tried using PublishOn and SubscribeTo but dint yield the results, I have tried creating a variable in main.js and thought of using it in both Home.js and people.js, I am able to access it by using $root. but I can do this only in Html page but not in Js.
Hope  I am clear with my problem statement.
**Note:**I am using RequireJs as well for configuration.</p>

<p>Please help me on this.</p>