How to redirect to home page using JavaScript



  • Good day,

    I am struggling to get redirect to home page work with monaca(HTML and JavaScript). Only go to the page with no nav bar.

    index.html
    <ons-navigator id=“appNavigator” swipeable swipe-target-width=“80px”>
    <ons-page>
    <ons-splitter id=“appSplitter”>
    <ons-splitter-side id=“sidemenu” page=“sidemenu.html” swipeable side=“right” collapse="" width=“260px”></ons-splitter-side>
    <ons-splitter-content id=“content” page=“tabbar.html”></ons-splitter-content>
    </ons-splitter>
    </ons-page>
    </ons-navigator>

    <template id=“tabbar.html”>
    <ons-page id=“tabbar-page”>
    <ons-toolbar>
    <div class=“center”>Home</div>
    <div class=“right”>
    <ons-toolbar-button onclick=“fn.toggleMenu()”>
    <ons-icon icon=“ion-navicon, material:md-menu”></ons-icon>
    </ons-toolbar-button>
    </div>
    </ons-toolbar>
    <ons-tabbar swipeable id=“appTabbar” position=“auto”>
    <ons-tab label=“Home” icon=“ion-home” page=“home.html” active></ons-tab>
    <ons-tab label=“The Village” icon=“md-album” page=“viewAll.html”></ons-tab>
    <ons-tab label=“Reviews” icon=“ion-ios-star-half” page=“reviews.html”></ons-tab>
    <ons-tab label=“Process” icon=“ion-loop” page=“processflow.html”></ons-tab>
    </ons-tabbar>

    .myfile.js
    fn.pushPage(“home.html”) - I want the navbar included. Can I go to #appNavigator so can have the full page?

    Please not the login page does not have back button and I want it full screen.

    Please let me know if need further information.



  • Sorry found the solution. I was looking for popPage() to take me back.


Log in to reply