How to navigate to app.root.xml


#1

Hi,
Since {N} 4.0 we can have:

<TabView androidTabsPosition="bottom">
    <TabViewItem title="First">
        <Frame defaultPage="home/home-page" />
    </TabViewItem>
    <TabViewItem title="Second">
        <Frame defaultPage="second/second-page" />
    </TabViewItem>
</TabView>

Now, let’s say, than i navigate to another page. Next i want to navigate to this page (app.root.xml), how to do it properly ?
I see that this will not work:

var getFrameById = require("ui/frame");
        var topmost = getFrameById.topmost();
        topmost.navigate('app-root');

Thanks for any help.


#2

For me this works:

model.login = function() {
        var application = require("application");
        application.run({ moduleName: "dashboard/root" });
    };

so, just simple
var application = require(“application”);
application.run({ moduleName: “dashboard/root” });


#3

Be aware, android throws an error.
I didn’t investigate this yet.
Can you confirm if this works for you on android ?