Files
Martin Guillon e3e5dea2be Merge branch 'master' of github.com:NativeScript/NativeScript
# Conflicts:
#	package.json
#	packages/core/bundle-entry-points.ts
#	packages/core/color/color-common.ts
#	packages/core/color/index.d.ts
#	packages/core/globals/index.ts
#	packages/core/package.json
#	packages/core/ui/core/bindable/index.ts
#	packages/core/ui/core/properties/index.ts
#	packages/core/ui/core/view/index.android.ts
#	packages/core/ui/frame/index.android.ts
#	packages/core/ui/styling/style-scope.ts
#	packages/ui-mobile-base/android/gradle/wrapper/gradle-wrapper.properties
#	packages/webpack5/package.json
#	packages/webpack5/src/configuration/base.ts
2021-09-16 10:16:45 +02:00
..
2021-04-06 11:18:36 -07:00

Use the frame in the following way:

To navigate to the starting page of the application

// put this in the bootstrap.js
var app = require("application");
var frameModule = require("ui/frame");

app.onLaunch = function(context) {
	var frame = new frameModule.Frame();
	frame.navigate("testPage");
}

// or use the mainModule property of the application module
// in this a Frame instance is internally created and used to navigate to the main page module
app.mainModule = "testPage";

To navigate to a new Page

// take the frame from an existing (and navigatedTo) Page instance
var frame = page.frame;
frame.navigate("newPage");

To navigate to a new Activity (Android)

// create a new Frame instance
var frameModule = require("ui/frame");
var frame = new frameModule.Frame();
frame.navigate("newPage");