locked
Single page navigation RRS feed

  • Question

  •  I want the following navigation direction: default.html -> pageA -> pageB

    I am using the WinJS.UI.Pages.render method to navigate to the desired page. However, this method takes a DOM element as a second argument, where the page DOM will be rendered.

    So my problem is that when navigating from pageA to pageB, the default.html will contain contents of both pageA.html and pageB.html. Is it not possible that the contents of pageA get erased in default.html when we navigate from pageA to pageB ?

    Also does the WinJS.UI.Pages.render or WinJS.Navigation.navigate APIs provide the back button functionality automatically. Or does it need to me implemented ?

    Saturday, August 24, 2013 7:44 AM

Answers

  • Hi,

    I'm not sure if my understanding is correct, you have a page named defalut.html and inside there is a div for displaying the DOM from A and while navigate from Page A to Page B, the div content changed to DOM from B. If something not correct, update me plz.

    I think a good sample for you is here, all the pages are rendered by the WinJS.UI.Pages.render method, kind of erase one page and load another one, and you could also use the WinJS.Navigation.navigate to go back by reading the NavigationStack.

    Best Regards,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, August 26, 2013 7:44 AM
    Moderator