Skip to main content

openPageReplacement

Description

Removes the current Page from the navigation stack and replaces it with a new one. No previous entry is left to go back to.

Parameters

ParameterTypeDescription
pagePathStringPath or id of the Page to open
linkArgdynamicArgument passed to the target Page (any JSON-serializable value). Can be null
routeString?Transition style name (for example, 'cupertino', 'material', 'zoom'). Empty or null uses the default

Returns

void

Example

// Replace the login screen after a successful sign-in — going back never returns to it
$app.openPageReplacement("10_auth/A10login", {}, null);
  • $app.openPage(pagePath, linkArg, route) — Push a new Page on top of the current one
  • $app.openBackPage() — Go back to the previous Page