I created navigation app with 2 page control.
I have a list view on the first page, which gets values from external js and ajax request. I navigate to page2.html from home and from page2.html to home.
The first time the app loads. It loads everything. But if I click the browsers back button or navigate to first page. IT doesn't call the function:
(function(){
"use strict;
WinJS.UI.pages.define("/pages/home/home.html,{
ready: function (elemnet, options) {
document.getElementById('txtserver').value ="test";
basicListView.addEventListner("iteminvoked",handler);
}
)};
I'm calling this page from page2 like this: WinJS.navigation.navigate('/pages/home/home.html');
I want the page to load like the first time I open the app. However, it seems like navigation back in app doesn't refresh page or data inside like list view.
home->page1 (ready works) page1->home (ready doesn't work)
How do I refresh a page with content on navigation?