Files
Martin Yankov 0ffc790d82 chore: remove critical circular dependencies (#8114)
* chore: remove critical circular dependencies

* chore: fix tslint errors

* chore: remove platform specific types from interfaces

* chore: update unit tests polyfills

* fix: incorrect null check

* chore: update api.md file

* test: improve test case

* chore: apply comments

* test: avoid page style leaks in tests
2019-11-28 13:36:34 +02:00
..
2019-10-17 00:45:33 +03:00
2019-10-17 00:45:33 +03:00
2019-10-17 00:45:33 +03:00
2019-10-17 00:45:33 +03: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");