Frame

To perform navigation, you will need a reference to the topmost frame of the application.

import * as frameModule from "tns-core-modules/ui/frame";
var topmost = frameModule.topmost();
topmost.navigate("details-page");
var factoryFunc = function () {
    var label = new labelModule.Label();
    label.text = "Hello, world!";
    var page = new pagesModule.Page();
    page.content = label;
    return page;
};
topmost.navigate(factoryFunc);
var navigationEntry = {
    moduleName: "details-page",
    context: { info: "something you want to pass to your page" },
    animated: false
};
topmost.navigate(navigationEntry);
topmost.goBack();

Stay connected with NativeScript

(expect a newsletter every 4-8 weeks)

NativeScript
NativeScript is licensed under the Apache 2.0 license .
© Progress Software Corporation. All Rights Reserved.